Dockerfile for WSL
trufty opened this issue · 2 comments
:edit: made some small changes as I learn new things about Docker
I put together a Dockerfile for us poor WSL users, so we can run the notebook from our browser in Windows.
FROM nvidia/cuda:11.6.2-base-ubuntu20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install python3 -y && \
apt-get install python3-pip -y && \
apt-get install git curl wget ffmpeg libsm6 libxext6 -y
RUN pip3 install torch torchvision --extra-index-url https://download.pytorch.org/whl/cu116
RUN pip3 install jupyterlab notebook numpy pillow
WORKDIR /root/data/
CMD ["python3", "-m", "jupyter", "notebook", "/root/data/", "-i 0.0.0.0", "--allow-root", "--no-browser", "--NotebookApp.token=''"]
Then download the jupyter notebook to some local drive.
Run with
start wsl.exe -e sh -c "docker run -p 8888:8888 --network host --shm-size=200m --rm --gpus all -it -v <WSL path to jupyter notebook directory>:/root/data <your docker image name>"
Then open your browser to localhost:8888
That's it!
Note: the WSL path to the notebook will be like /mnt/c/.../
c being the C: drive
@trufty 😄 thanks for giving an easy-to-use interface for people during the infancy of this project !
I'm believe that this is now outdated as the repository has changed dramatically in the past month, and support has moved to scripts (instead of a notebook). As a result, I am going to close this issue.
thanks again!
No problem! I will create a new one once the inference scripts become more finalized.