Spaces:
Sleeping
Sleeping
Commit
·
a45cd99
1
Parent(s):
4cca4a8
Tried to add volumes and vars to Dockerfile
Browse files- Dockerfile +45 -3
Dockerfile
CHANGED
@@ -5,15 +5,57 @@
|
|
5 |
# Set up a jupyter-lab for #
|
6 |
# developing using deepvats #
|
7 |
#############################
|
|
|
8 |
##############
|
9 |
# Base image #
|
10 |
##############
|
11 |
-
|
12 |
# Adds rstudio server, tiyverse, devtools to rocker/cuda
|
13 |
FROM rocker/ml:4.2
|
14 |
|
15 |
SHELL [ "/bin/bash", "--login", "-c" ]
|
16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
|
18 |
RUN apt-get update
|
19 |
RUN apt-get install -y python3-pip
|
@@ -22,7 +64,7 @@ RUN apt-get install -y python3-venv libxt-dev
|
|
22 |
## Install R packages
|
23 |
|
24 |
#COPY docker/DESCRIPTION /tmp/
|
25 |
-
COPY --chown=${
|
26 |
|
27 |
RUN ls -la /tmp/ && sleep 5
|
28 |
|
@@ -38,7 +80,7 @@ RUN R -e "devtools::install_deps('/tmp/', dependencies = TRUE)"
|
|
38 |
#RUN R -e "install.packages('reticulate')"
|
39 |
|
40 |
|
41 |
-
|
42 |
ENV ENV_PREFIX $HOME/env
|
43 |
|
44 |
RUN echo "---> Make sudo & setup sudoers"
|
|
|
5 |
# Set up a jupyter-lab for #
|
6 |
# developing using deepvats #
|
7 |
#############################
|
8 |
+
|
9 |
##############
|
10 |
# Base image #
|
11 |
##############
|
|
|
12 |
# Adds rstudio server, tiyverse, devtools to rocker/cuda
|
13 |
FROM rocker/ml:4.2
|
14 |
|
15 |
SHELL [ "/bin/bash", "--login", "-c" ]
|
16 |
|
17 |
+
###############
|
18 |
+
# Ensure vars #
|
19 |
+
###############
|
20 |
+
ARG USER_NAME
|
21 |
+
ARG USER_ID
|
22 |
+
ARG GROUP_ID
|
23 |
+
ARG WANDB_API_KEY
|
24 |
+
ARG WANDB_ENTITY
|
25 |
+
ARG WANDB_PROJECT
|
26 |
+
ARG GH_TOKEN
|
27 |
+
|
28 |
+
|
29 |
+
ENV USER_NAME=$USER_NAME
|
30 |
+
ENV USER_ID=$USER_ID
|
31 |
+
ENV GROUP_ID=$GROUP_ID
|
32 |
+
ENV WANDB_ENTITY=$WANDB_ENTITY
|
33 |
+
ENV WANDB_API_KEY=$WANDB_API_KEY
|
34 |
+
ENV RETICULATE_PYTHON_ENV=/home/${USER_NAME}/env
|
35 |
+
ENV RETICULATE_MINICONDA_PATH=/home/${USER_NAME}/miniconda
|
36 |
+
ENV WANDB_PROJECT=$WANDB_PROJECT
|
37 |
+
ENV ROOT=TRUE
|
38 |
+
ENV CUDA_VISIBLE_DEVICES=0,1,2
|
39 |
+
ENV GH_TOKEN=$ghtoken
|
40 |
+
ENV ENV_VARS=WANDB_ENTITY,WANDB_PROJECT,USER_NAME,USER_ID,GROUP_ID,PASSWORD,ROOT,CUDA_VISIBLE_DEVICES
|
41 |
+
|
42 |
+
ENV HOME /home/${USER_NAME}
|
43 |
+
|
44 |
+
###########
|
45 |
+
# Volumes #
|
46 |
+
###########
|
47 |
+
|
48 |
+
|
49 |
+
RUN echo ${HOME}
|
50 |
+
RUN echo ${USER_NAME}"|"${USER_ID}"|"${GROUP_ID}
|
51 |
+
COPY --chown=${USER_ID}:${GROUP_ID} ../r_shiny_app /$HOME/app
|
52 |
+
COPY --chown=${USER_ID}:${GROUP_ID} ${LOCAL_DATA_PATH} /$HOME/data/
|
53 |
+
COPY --chown=${USER_ID}:${GROUP_ID} ../dvats ${HOME}/dvats
|
54 |
+
COPY --chown=${USER_ID}:${GROUP_ID} ../lib /${HOME}/lib
|
55 |
+
|
56 |
+
|
57 |
+
|
58 |
+
|
59 |
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A4B469963BF863CC
|
60 |
RUN apt-get update
|
61 |
RUN apt-get install -y python3-pip
|
|
|
64 |
## Install R packages
|
65 |
|
66 |
#COPY docker/DESCRIPTION /tmp/
|
67 |
+
COPY --chown=${USER_ID}:${GROUP_ID} docker/DESCRIPTION /tmp/
|
68 |
|
69 |
RUN ls -la /tmp/ && sleep 5
|
70 |
|
|
|
80 |
#RUN R -e "install.packages('reticulate')"
|
81 |
|
82 |
|
83 |
+
|
84 |
ENV ENV_PREFIX $HOME/env
|
85 |
|
86 |
RUN echo "---> Make sudo & setup sudoers"
|