Update Python version in Dockerfile-GPU (#71)

This commit is contained in:
Tanay Soni 2020-04-22 19:41:21 +02:00 committed by GitHub
parent 3fe319ab20
commit dcb5be45b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,29 +2,19 @@ FROM nvidia/cuda:10.1-runtime
WORKDIR /home/user WORKDIR /home/user
RUN apt-get update \ RUN apt-get update && apt-get install -y python3.7 python3.7-dev python3.7-distutils python3-pip curl git
&& apt-get install -y python3-pip python3-dev \
&& cd /usr/local/bin \
&& ln -s /usr/bin/python3 python \
&& pip3 install --upgrade pip
# Install some basic utilities # Set default Python version
RUN apt-get update && apt-get install -y \ RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1
curl \ RUN update-alternatives --set python3 /usr/bin/python3.7
ca-certificates \
sudo \
git \
bzip2 \
libx11-6 \
&& rm -rf /var/lib/apt/lists/*
# copy code # copy code
COPY haystack /home/user/haystack COPY haystack /home/user/haystack
# install as a package # install as a package
COPY setup.py requirements.txt README.rst /home/user/ COPY setup.py requirements.txt README.rst /home/user/
RUN pip install -r requirements.txt RUN pip3 install -r requirements.txt
RUN pip install -e . RUN pip3 install -e .
# copy saved FARM models # copy saved FARM models
COPY models /home/user/models COPY models /home/user/models