Commit 8056ef00 authored by Yunsheng Li's avatar Yunsheng Li

Update Dockerfile

parent 507010c0
Pipeline #9743 failed with stage
in 36 minutes and 2 seconds
...@@ -4,8 +4,8 @@ LABEL maintainer="yunsheng li<yul554@ucsd.edu>" ...@@ -4,8 +4,8 @@ LABEL maintainer="yunsheng li<yul554@ucsd.edu>"
ENV CONDA_DIR=/opt/conda \ ENV CONDA_DIR=/opt/conda \
SHELL=/bin/bash \ SHELL=/bin/bash \
NB_USER=svcl \ NB_USER=yunsheng \
NB_UID=1001 \ NB_UID=1000 \
NB_GID=100 \ NB_GID=100 \
LC_ALL=en_US.UTF-8 \ LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \ LANG=en_US.UTF-8 \
...@@ -55,6 +55,9 @@ RUN set -x \ ...@@ -55,6 +55,9 @@ RUN set -x \
curl \ curl \
wget \ wget \
unzip \ unzip \
python-pip \
zip \
python-setuptools \
&& apt-get clean \ && apt-get clean \
&& rm -rf /var/lib/apt/lists/* \ && rm -rf /var/lib/apt/lists/* \
&& wget https://blink.ucsd.edu/_files/technology-tab/network/vpn_install-4.6.01098.sh \ && wget https://blink.ucsd.edu/_files/technology-tab/network/vpn_install-4.6.01098.sh \
...@@ -92,11 +95,15 @@ RUN set -x \ ...@@ -92,11 +95,15 @@ RUN set -x \
&& echo "e1045ee415162f944b6aebfe560b8fee *Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh" | md5sum -c - \ && echo "e1045ee415162f944b6aebfe560b8fee *Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh" | md5sum -c - \
&& /bin/bash Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR \ && /bin/bash Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh -f -b -p $CONDA_DIR \
&& rm Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh \ && rm Miniconda3-${MINICONDA_VERSION}-Linux-x86_64.sh \
#&& /usr/bin/pip install torch \
#&& /usr/bin/pip install torchvision \
#&& /usr/bin/pip install scipy \
&& $CONDA_DIR/bin/conda config --system --prepend channels conda-forge \ && $CONDA_DIR/bin/conda config --system --prepend channels conda-forge \
#&& $CONDA_DIR/bin/conda config --remove channels conda-forge \
&& $CONDA_DIR/bin/conda config --add channels conda-forge \
&& $CONDA_DIR/bin/conda config --system --set auto_update_conda false \ && $CONDA_DIR/bin/conda config --system --set auto_update_conda false \
&& $CONDA_DIR/bin/conda config --system --set show_channel_urls true \ && $CONDA_DIR/bin/conda config --system --set show_channel_urls true \
&& $CONDA_DIR/bin/conda update --all --quiet --yes \ && $CONDA_DIR/bin/conda update --all --quiet --yes \
#&& $CONDA_DIR/bin/conda update conda --yes \
&& conda update -n base -c defaults conda --quiet --yes \ && conda update -n base -c defaults conda --quiet --yes \
&& conda clean -tipsy \ && conda clean -tipsy \
&& fix-permissions $CONDA_DIR && fix-permissions $CONDA_DIR
...@@ -111,17 +118,29 @@ RUN set -x \ ...@@ -111,17 +118,29 @@ RUN set -x \
RUN set -x \ RUN set -x \
&& conda install --quiet --yes -c pytorch \ && conda install --quiet --yes -c pytorch \
'nomkl' \ 'nomkl' \
'ipywidgets=7.4*' \ 'ipywidgets=7.4*' \
&& conda clean -tipsy
RUN set -x \
&& conda install --quiet --yes -c pytorch \
'pandas=0.23*' \ 'pandas=0.23*' \
'numexpr=2.6*' \ 'numexpr=2.6*' \
'matplotlib=2.2*' \ 'matplotlib=2.2*' \
&& conda clean -tipsy
RUN set -x \
&& conda install --quiet --yes -c pytorch \
'scipy=1.1*' \ 'scipy=1.1*' \
'seaborn=0.9*' \ 'seaborn=0.9*' \
'scikit-learn=0.19*' \ 'scikit-learn=0.19*' \
'scikit-image=0.14*' \ 'scikit-image=0.14*' \
'sympy=1.2*' \ 'sympy=1.2*' \
&& conda clean -tipsy
RUN set -x \
&& conda install --quiet --yes -c pytorch \
'cython=0.28*' \ 'cython=0.28*' \
'patsy=0.5*' \ 'patsy=0.5*' \
'statsmodels=0.9*' \ 'statsmodels=0.9*' \
...@@ -129,18 +148,33 @@ RUN set -x \ ...@@ -129,18 +148,33 @@ RUN set -x \
'dill=0.2*' \ 'dill=0.2*' \
'numba=0.39*' \ 'numba=0.39*' \
'bokeh=0.13*' \ 'bokeh=0.13*' \
'sqlalchemy' \ && conda clean -tipsy
RUN set -x \
&& conda install --quiet --yes -c pytorch \
'sqlalchemy=1.2*' \
'hdf5=1.10.2' \ 'hdf5=1.10.2' \
'h5py=2.8*' \ 'h5py=2.8*' \
'vincent=0.4.*' \ 'vincent=0.4.*' \
'beautifulsoup4=4.6.*' \ 'beautifulsoup4=4.6.*' \
'protobuf=3.*' \ 'protobuf=3.*' \
&& conda clean -tipsy
RUN set -x \
&& conda install --quiet --yes -c pytorch \
'jupyter_contrib_nbextensions' \ 'jupyter_contrib_nbextensions' \
'xlrd' \ 'xlrd' \
'astropy' \ 'astropy' \
'numpy' \ 'numpy' \
'r-irkernel' \ 'r-irkernel' \
'pytorch=1.*' \ 'dominate' \
'visdom' \
'easydict' \
&& conda clean -tipsy
RUN set -x \
&& conda install --quiet --yes -c pytorch \
'pytorch' \
'torchvision' \ 'torchvision' \
'cudatoolkit=10.2' \ 'cudatoolkit=10.2' \
&& conda remove --quiet --yes --force qt pyqt \ && conda remove --quiet --yes --force qt pyqt \
...@@ -153,20 +187,27 @@ RUN set -x \ ...@@ -153,20 +187,27 @@ RUN set -x \
opencv-python \ opencv-python \
requests \ requests \
tensorflow-gpu==1.13.0rc1 \ tensorflow-gpu==1.13.0rc1 \
visualdl \ #torch \
#torchvision \
visualdl==0.0.2 \
git+https://github.com/veeresht/CommPy.git \ git+https://github.com/veeresht/CommPy.git \
tensorflow-probability \ #tensorflow-probability-gpu \
bash_kernel \ bash_kernel \
matlab_kernel \ matlab_kernel \
shapely \ shapely \
fire \ fire \
pybind11 \ pybind11 \
tensorboardX==1.6 \ tensorboardX \
protobuf \ protobuf \
scikit-image \ scikit-image \
numba \ numba \
pillow \ pillow==6.1 \
ninja \
yacs \
#opencv-python \
tqdm \
#cython \
#matplotlib \
&& python -m bash_kernel.install \ && python -m bash_kernel.install \
&& jupyter nbextension enable --py widgetsnbextension --sys-prefix \ && jupyter nbextension enable --py widgetsnbextension --sys-prefix \
...@@ -182,7 +223,6 @@ RUN python -m pip install cmake ...@@ -182,7 +223,6 @@ RUN python -m pip install cmake
EXPOSE 8888 EXPOSE 8888
EXPOSE 22 EXPOSE 22
EXPOSE 2222 EXPOSE 2222
EXPOSE 6006
WORKDIR $HOME WORKDIR $HOME
ENTRYPOINT ["tini", "--"] ENTRYPOINT ["tini", "--"]
...@@ -205,8 +245,36 @@ ENV XDG_CACHE_HOME /home/$NB_USER/.cache/ ...@@ -205,8 +245,36 @@ ENV XDG_CACHE_HOME /home/$NB_USER/.cache/
RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \ RUN MPLBACKEND=Agg python -c "import matplotlib.pyplot" && \
fix-permissions /home/$NB_USER fix-permissions /home/$NB_USER
RUN echo "svcl ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \ RUN echo "gautam ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
usermod -aG sudo svcl && \ usermod -aG sudo yunsheng && \
usermod -aG root svcl usermod -aG root yunsheng
USER root
RUN apt-get update && \
apt-get -y install openssh-server && \
rm -rf /var/lib/apt/lists/* && \
mkdir -p /var/run/sshd && \
rm -f /etc/ssh/ssh_host_*key*
COPY sshd_config /etc/ssh/sshd_config
COPY create-sftp-user /usr/local/bin/
COPY entrypoint /
RUN ["chmod", "+x", "/etc/ssh/sshd_config"]
RUN ["chmod", "+x", "/usr/local/bin/create-sftp-user"]
RUN ["chmod", "+x", "/entrypoint"]
#RUN ["chown", "-R", "svcl", "/home/svcl/"]
EXPOSE 22
RUN set -x \
&& fix-permissions $HOME \
&& fix-permissions $CONDA_DIR \
&& fix-permissions /etc
USER root #RUN echo "svcl ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers && \
\ No newline at end of file # usermod -aG sudo svcl && \
# usermod -aG root svcl
ENTRYPOINT ["/entrypoint"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment