diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +* diff --git a/Dockerfile b/Dockerfile index c348df4..2d7c34d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,6 @@ # modified from https://hub.docker.com/r/cwaffles/openpose FROM nvidia/cuda:11.4.0-cudnn8-devel-ubuntu20.04 +#FROM nvidia/cuda:11.8.0-cudnn8-devel-ubuntu22.04 #get deps RUN apt-get update && \ @@ -32,10 +33,23 @@ RUN make install RUN cp /openpose/build/python/openpose/pyopenpose.cpython-38-x86_64-linux-gnu.so /usr/local/lib/python3.8/dist-packages/ WORKDIR /usr/local/lib/python3.8/dist-packages RUN ln -s pyopenpose.cpython-38-x86_64-linux-gnu.so pyopenpose +#RUN cp /openpose/build/python/openpose/pyopenpose.cpython-310-x86_64-linux-gnu.so /usr/local/lib/python3.10/dist-packages/ +#WORKDIR /usr/local/lib/python3.10/dist-packages +#RUN ln -s pyopenpose.cpython-310-x86_64-linux-gnu.so pyopenpose #ENV LD_LIBRARY_PATH=/openpose/build/python/openpose RUN apt-get install -y ffmpeg -WORKDIR /openpose +# Notebook to actually run code +#RUN apt-get install -y python3-notebook +RUN pip install ipywidgets --ignore-installed +RUN pip install notebook +RUN pip install ipywebrtc +EXPOSE 8888 +# Possibly, use /home/user/app & set HOME to /home/user to avoid temporary directories in the app folder (if desired) +WORKDIR /app +ENV HOME /app +#CMD ["env"] +CMD ["jupyter", "notebook", "--ip", "0.0.0.0"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..dd90f75 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,21 @@ +version: "3.3" +services: + suspicion_nb: + image: suspicion_nb + restart: always + build: + context: . + dockerfile: ./Dockerfile + user: "1000:1000" + deploy: + resources: + reservations: + devices: + - driver: nvidia + count: 1 + capabilities: [gpu] + ports: + - "8888:8888" + volumes: + - ./data:/data + - ./app:/app