-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
tf-torch-conda.Dockerfile
45 lines (39 loc) · 1.26 KB
/
tf-torch-conda.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
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM matifali/dockerdl:conda
ARG PYTHON_VER=3.10
# Change to your user
USER 1000
# Change Workdir
WORKDIR ${HOME}
# Create deep-learning environment
RUN conda create --name DL --channel conda-forge python=${PYTHON_VER} --yes && conda clean --all --yes
# Make new shells activate the DL environment:
RUN echo "# Make new shells activate the DL environment" >>${HOME}/.bashrc && \
echo "conda activate DL" >>${HOME}/.bashrc
# Tensorflow Package version passed as build argument e.g. --build-arg TF_VERSION=2.9.2
# A blank value will install the latest version
ARG TF_VERSION=
# Install packages inside the new environment
RUN conda activate DL && pip install --upgrade --no-cache-dir pip && \
pip install --upgrade --no-cache-dir torch torchvision torchaudio torchtext && \
pip install --upgrade --no-cache-dir \
ipywidgets \
jupyterlab \
lightning \
matplotlib \
nltk \
numpy \
pandas \
Pillow \
plotly \
PyYAML \
scipy \
scikit-image \
scikit-learn \
sympy \
seaborn \
tensorflow${TF_VERSION:+==${TF_VERSION}} \
tqdm && \
pip cache purge && \
# Set path of python packages
echo "# Set path of python packages" >>${HOME}/.bashrc && \
echo 'export PATH=$HOME/.local/bin:$PATH' >>${HOME}/.bashrc