Skip to content

Commit

Permalink
Update Dockerfile (deepfakes#1112)
Browse files Browse the repository at this point in the history
  • Loading branch information
amitsh1 authored Jan 9, 2021
1 parent 163b8fe commit 15bbc95
Showing 1 changed file with 22 additions and 15 deletions.
37 changes: 22 additions & 15 deletions Dockerfile.gpu
Original file line number Diff line number Diff line change
@@ -1,20 +1,27 @@
FROM tensorflow/tensorflow:2.2.1-gpu-py3
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04

# To disable tzdata and others from asking for input
ENV DEBIAN_FRONTEND noninteractive

RUN add-apt-repository -y ppa:jonathonf/ffmpeg-4 \
&& apt-get update -qq -y \
&& apt-get install -y libsm6 libxrender1 libxext-dev python3-tk ffmpeg git \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
#install python3.8
RUN apt-get update
RUN apt install software-properties-common -y
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt-get update
RUN apt install python3.8 -y
RUN apt install python3.8-distutils -y
RUN apt install curl -y
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python3.8 get-pip.py
RUN rm get-pip.py

# install requirements
RUN apt-get install ffmpeg git -y
COPY _requirements_base.txt /opt/
RUN pip3 install --upgrade pip
RUN pip3 --no-cache-dir install -r /opt/_requirements_base.txt && rm /opt/_requirements_base.txt
RUN pip3 install jupyter matplotlib
RUN pip3 install jupyter_http_over_ws
RUN jupyter serverextension enable --py jupyter_http_over_ws
COPY requirements_nvidia.txt /opt/
RUN python3.8 -m pip --no-cache-dir install -r /opt/requirements_nvidia.txt && rm /opt/_requirements_base.txt && rm /opt/requirements_nvidia.txt

RUN python3.8 -m pip install jupyter matplotlib
RUN python3.8 -m pip install jupyter_http_over_ws
RUN jupyter serverextension enable --py jupyter_http_over_ws
RUN alias python=python3.8
RUN echo "alias python=python3.8" >> /root/.bashrc
WORKDIR "/notebooks"
CMD ["jupyter-notebook", "--allow-root" ,"--port=8888" ,"--no-browser" ,"--ip=0.0.0.0"]
CMD ["jupyter-notebook", "--allow-root" ,"--port=8888" ,"--no-browser" ,"--ip=0.0.0.0"]

0 comments on commit 15bbc95

Please sign in to comment.