forked from jina-ai/discoart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (23 loc) · 786 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04
# Set bash as default shell
ENV SHELL=/bin/bash
# Create a working directory
WORKDIR /app/
# Build with some basic utilities
RUN apt-get update && apt-get install -y \
python3-pip \
apt-utils \
git wget
# alias python='python3'
RUN ln -s /usr/bin/python3 /usr/bin/python
RUN pip install \
numpy \
torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116 \
jupyterlab ipywidgets
RUN jupyter nbextension enable --py widgetsnbextension
# copy will almost always invalid the cache
COPY . /discoart/
RUN cd /discoart && pip install --compile .
COPY discoart.ipynb /home/jovyan/
CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--allow-root", "--no-browser"]
EXPOSE 8888