-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update `conda` - update app requirements
- Loading branch information
Showing
1 changed file
with
15 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,10 +3,10 @@ LABEL maintainer="Ravnoor Singh Gill <[email protected]>" | |
|
||
RUN apt-get update && apt-get upgrade -y \ | ||
&& apt-get install -y git \ | ||
bash \ | ||
wget \ | ||
bzip2 \ | ||
sudo \ | ||
bash \ | ||
wget \ | ||
bzip2 \ | ||
sudo \ | ||
&& sudo apt-get clean \ | ||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
|
@@ -18,26 +18,27 @@ WORKDIR /app | |
|
||
# create a non-root user and switch to it | ||
RUN adduser --disabled-password --gecos '' --shell /bin/bash user \ | ||
&& chown -R user:user /app | ||
&& chown -R user:user /app | ||
RUN echo "user ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/90-user | ||
USER user | ||
|
||
# all users can use /home/user as their home directory | ||
ENV HOME=/home/user | ||
RUN chmod 777 /home/user | ||
|
||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux-x86_64.sh \ | ||
&& /bin/bash Miniconda3-py37_4.9.2-Linux-x86_64.sh -b -p /home/user/conda \ | ||
&& rm Miniconda3-py37_4.9.2-Linux-x86_64.sh | ||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-py37_4.11.0-Linux-x86_64.sh \ | ||
&& /bin/bash Miniconda3-py37_4.11.0-Linux-x86_64.sh -b -p /home/user/conda \ | ||
&& rm Miniconda3-py37_4.11.0-Linux-x86_64.sh | ||
|
||
RUN conda install --yes Theano=1.0.4 keras=2.2.4 -c conda-forge \ | ||
&& conda install pytorch torchvision cpuonly -c pytorch \ | ||
&& conda clean -ya | ||
RUN python -m pip install --upgrade --force --ignore-installed pip | ||
|
||
COPY app/requirements.txt /app/requirements.txt | ||
COPY app/requirements.txt /app/requirements.txt | ||
|
||
RUN pip install -r /app/requirements.txt \ | ||
&& rm -rf /home/user/.cache | ||
RUN python -m pip install -r /app/requirements.txt --find-links https://download.pytorch.org/whl/torch_stable.html | ||
|
||
RUN conda install -c conda-forge pygpu==0.7.6 | ||
|
||
RUN pip cache purge | ||
|
||
COPY app/ /app/ | ||
|
||
|