-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (40 loc) · 1.46 KB
/
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
46
47
48
49
50
51
FROM snowyday/barekit:latest
MAINTAINER snowyday
# User
ENV USER user
ENV PASS user
USER $USER
WORKDIR /home/$USER
# Set anaconda version
ENV ANACONDA anaconda3-2020.02
ENV HOME /home/$USER
ENV PATH /home/$USER/.pyenv/bin:/opt/pyenv/shims:$PATH
ENV PYENV_ROOT /home/$USER/.pyenv
ENV PATH $PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH
ENV DYLD_FALLBACK_LIBRARY_PATH $PYENV_ROOT/versions/$ANACONDA/lib
# Pyenv
RUN git clone https://github.com/yyuu/pyenv.git ~/.pyenv
RUN git clone git://github.com/yyuu/pyenv-update.git ~/.pyenv/plugins/pyenv-update
# Anaconda
RUN pyenv install $ANACONDA
RUN pyenv global $ANACONDA
# Python libs
## conda
RUN conda install -y pytorch torchvision cudatoolkit=10.1 -c pytorch
## pip
RUN pip install tqdm dill lifelines Xgboost ipdb parmap gym pyarrow hiredis plotly==4.4.1 umap-learn optuna
RUN pip install git+https://github.com/hyperopt/hyperopt.git
## clear
RUN conda clean --all -y
# Jupyter
RUN jupyter notebook --generate-config \
&& echo ''c.NotebookApp.token = \"$PASS\"'' >> $HOME/.jupyter/jupyter_notebook_config.py \
&& echo ''c.NotebookApp.ip = \"0.0.0.0\"'' >> $HOME/.jupyter/jupyter_notebook_config.py
# ENV export
RUN echo "export PYENV_ROOT=/home/$USER/.pyenv" >> ~/.zshrc
RUN echo "export PATH=$PYENV_ROOT/bin:$PYENV_ROOT/shims:\$PATH" >> ~/.zshrc
RUN echo "export DYLD_FALLBACK_LIBRARY_PATH=$PYENV_ROOT/versions/$ANACONDA/lib" >> ~/.zshrc
RUN echo 'eval "$(pyenv init -)"' >> ~/.zshrc
# SSH start
USER root
CMD ["/usr/sbin/sshd", "-D"]