-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
88 lines (66 loc) · 2.75 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
FROM jupyter/minimal-notebook:3395de4db93a
# name your environment and choose python 3.x version
ARG conda_env=python3
ARG py_ver=3.8
# you can add additional libraries you want conda to install by listing them below the first line and ending with "&& \"
RUN conda create --quiet --yes -p $CONDA_DIR/envs/$conda_env python=$py_ver ipython ipykernel && \
conda clean --all -f -y
# create Python 3.x environment and link it to jupyter
RUN $CONDA_DIR/envs/${conda_env}/bin/python -m ipykernel install --user --name=${conda_env} && \
fix-permissions $CONDA_DIR && \
fix-permissions /home/$NB_USER
USER $NB_USER
ADD . .
RUN $CONDA_DIR/envs/${conda_env}/bin/pip install pipenv
RUN $CONDA_DIR/envs/${conda_env}/bin/pip install pipfile-requirements
RUN $CONDA_DIR/envs/${conda_env}/bin/pipfile2req > requirements.txt
RUN $CONDA_DIR/envs/${conda_env}/bin/pip install -r requirements.txt
# prepend conda environment to path
ENV PATH $CONDA_DIR/envs/${conda_env}/bin:$PATH
# if you want this environment to be the default one, uncomment the following line:
ENV CONDA_DEFAULT_ENV ${conda_env}
USER root
RUN apt-get update && apt-get install -y \
default-jdk \
maven \
curl \
openssh-client \
dos2unix \
awscli
# Get Rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="/home/$NB_USER/.cargo/bin:${PATH}"
RUN ansible-galaxy collection install amazon.aws:2.0.0
RUN ansible-galaxy collection install community.aws:2.0.0
USER $NB_USER
USER root
# Windows compability
RUN dos2unix /home/$NB_USER/zeph-crypto/native/compile-and-install.sh
RUN mvn clean install
RUN mkdir -p /home/$NB_USER/results/review-results
RUN mkdir -p /home/$NB_USER/data
RUN mkdir -p /home/$NB_USER/logs
RUN fix-permissions "/home/$NB_USER/.cargo"
RUN fix-permissions "/home/$NB_USER/.ansible"
RUN fix-permissions "/home/$NB_USER/ansible"
RUN fix-permissions "/home/$NB_USER/results"
RUN fix-permissions "/home/$NB_USER/data"
RUN fix-permissions "/home/$NB_USER/logs"
RUN fix-permissions "/home/$NB_USER/zeph-benchmarks"
RUN fix-permissions "/home/$NB_USER/zeph-client"
RUN fix-permissions "/home/$NB_USER/zeph-crypto"
RUN fix-permissions "/home/$NB_USER/zeph-server"
RUN fix-permissions "/home/$NB_USER/zeph-shared"
RUN fix-permissions "/home/$NB_USER/results/review-results"
RUN mv /home/$NB_USER/aws-material/boto /home/$NB_USER/.boto
RUN mkdir /home/$NB_USER/.ssh
RUN mv /home/$NB_USER/aws-material/id_rsa_zeph /home/$NB_USER/.ssh/
RUN chgrp $NB_GID /home/$NB_USER/.ssh
RUN chmod g+rw /home/$NB_USER/.ssh
RUN chgrp $NB_GID /home/$NB_USER/.ssh/id_rsa_zeph
RUN chmod g+rw /home/$NB_USER/.ssh/id_rsa_zeph
RUN chgrp $NB_GID /home/$NB_USER/.boto
RUN chmod g+rwX /home/$NB_USER/.boto
RUN apt-get --purge remove -y dos2unix
USER $NB_USER
CMD ["start.sh", "jupyter", "lab"]