-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (32 loc) · 1.29 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
FROM gitlab-registry.nrp-nautilus.io/prp/jupyter-stack/minimal
USER root
# Install dependency (You may add other dependencies here)
RUN apt update && apt install -y make rsync git vim
RUN wget https://github.com/peak/s5cmd/releases/download/v2.2.2/s5cmd_2.2.2_linux_amd64.deb && dpkg -i s5cmd_2.2.2_linux_amd64.deb && rm s5cmd_2.2.2_linux_amd64.deb
# Add ssh key
RUN mkdir -p /root/.ssh
ADD .ssh/id_rsa /root/.ssh/id_rsa
ADD .ssh/config /root/.ssh/config
ADD .ssh/known_hosts /root/.ssh/known_hosts
RUN chmod 400 /root/.ssh/id_rsa
RUN chmod 400 /root/.ssh/config
RUN chmod 400 /root/.ssh/known_hosts
# Pull the latest project
WORKDIR /root/
RUN git clone --depth=1 PROJECT_SSH_URL
WORKDIR /root/PROJECT_NAME/
# Handle git submodule
RUN git submodule update --init --recursive
# Install conda environment
RUN conda update --all
RUN conda env create -n PROJECT_NAME --file environment.yml
RUN conda clean -qafy
# Activate the new conda environment and install poetry
SHELL ["/opt/conda/bin/conda", "run", "-n", "PROJECT_NAME", "/bin/bash", "-c"]
RUN wget https://pdm-project.org/install-pdm.py && python install-pdm.py && rm install-pdm.py
RUN pdm install
RUN pip install numpy==1.21.6
RUN pip install cython==0.29.37
RUN cd VUS && python setup.py install
RUN pip install google-generativeai
RUN pip install torch