-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile request #20
Comments
This worked for me on an ubuntu host with CUDA 11.4 but YMMV. It does not yet run the GUI tho, if anybody wants to add that please contribute! (i think you can volume mount the x socket but the image might need some other libs too). You can also skip the colmap stuff if you don't want colmap. (edit remove nproc from build command not needed)
|
Hello, I am having difficulty with the Dockerfile. Specifically, I get:
after the build (i.e. the
My Dockerfile is almost exactly the same as the one above:
Do you have any advice? |
@greeneggsandyaml ahh yes I do get maybe the build command is bad, try |
Thanks for the quick reply. I will try that and see if it works. |
I think it's a typo on that last cmake command: cmake --build build --config RelWithDebInfo -j --target all `nproc` && \ should be: cmake --build build --config RelWithDebInfo --target all -j `nproc` && \ This shorter Dockerfile has been working for me, but is just a basic functioning image. Take into account that this uses FROM nvidia/cuda:11.5.1-devel-ubuntu20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get -y install build-essential git python3-dev python3-pip \
libopenexr-dev libxi-dev libglfw3-dev libglew-dev libomp-dev \
libxinerama-dev libxcursor-dev && \
# Clean up
apt-get autoremove -y && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*
ENV LD_LIBRARY_PATH="/usr/local/cuda/lib64:${LD_LIBRARY_PATH}" \
PIP_NO_CACHE_DIR="1"
RUN pip3 install --upgrade cmake
RUN git clone --recursive https://github.com/nvlabs/instant-ngp
WORKDIR instant-ngp
# choose your GPU architecture
ENV TCNN_CUDA_ARCHITECTURES=XX
RUN pip3 install -r requirements.txt && \
# add -DNGP_BUILD_WITH_GUI=OFF if you want to disable the GUI
cmake . -B build && \
cmake --build build --config RelWithDebInfo -j `nproc`
CMD ["/usr/bin/bash"] Note that if you save the Dockerfile in a non-empty directory you should add a .dockerignore file (just add an |
oh interesting @myagues what cmake do you get with |
It's the one on the PyPI repo, currently 3.22.1, but I guess you can choose which one you want as with any pip package installation. I was surprised this worked :) |
Update: the previous (long) Dockerfile worked for me with your fix. It's so nice to actually be able to use this. Also that looks like a nice short Dockerfile (though I haven't tested it yet), very concise. |
I got this error with the original dockerfile
|
@himat derp i edited it to clone the repo. the directory doesn't exist if you don't have anything cloned |
Thanks, it now built. But getting an X11 issue now if you have any ideas on the best way to set up X11 in this docker container I'm running on a remote machine over ssh.
|
I found a way to forward the GUI from inside the container, although I did not have a very good performance (3 FPS with albert on a GTX1070Ti), hopefully more powerful GPUs can still get good performance. The image I used is the short one I posted, but should work for the other docker image, as no additional packages are needed. Step 1: testing X11 forwarding between client and remoteFollow the setup recommended in the ArchWiki, for both the client and the remote server. If you do not have permission to edit Make sure your X11 forwarding connection is working with Step 2: X11 forwarding from container to clientOnce we know that our $ docker run --gpus all -it --net=host local/instant-ngp &
$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a24deeab6843 local/instant-ngp "/usr/bin/bash" 6 minutes ago Up 6 minutes elated_lederberg
$ docker exec -i elated_lederberg bash -c 'cat > ~/.Xauthority' < ~/.Xauthority
$ docker exec -it --env="DISPLAY" elated_lederberg bash Now, in the docker prompt:
If environment variable
|
Thanks, I also got it working on windows. Step 1Install XLaunch see https://dev.to/darksmile92/run-gui-app-in-linux-docker-container-on-windows-host-4kde Step 2Create a file named Dockerfile
Step 3Run the command below in the folder where the Dockerfile is located. Step 4Find your ip using ipconfig and run the command below with your ip and your image hash Step 5Run a command for example |
is the development container not for this purpose? in |
right the devcontainer appears to disable the gpu right now ( |
Closing since a |
I can't get it to build properly, it would be nice to have a docker image and or dev container to run it.
Saves everyone a lot of time trying to build the project.
The text was updated successfully, but these errors were encountered: