Spaces:
Sleeping
Sleeping
FROM misantamaria/dvats-rstudio:rocker-ml4.2 | |
#Permissions | |
RUN mkdir /var/run/s6 | |
############### | |
# Ensure vars # | |
############### | |
RUN echo "--> ARGS" | |
#ARG USER_NAME=USER_NAME | |
#ARG USER_ID=1000 | |
#ARG GROUP_ID=1000 | |
#ENV HOME /home/$USER_NAME | |
#ARG WANDB_ENTITY \ | |
# WANDB_PROJECT | |
RUN echo "--> ARGS -> ENV" | |
ENV USER_NAME=user \ | |
USER_ID=1000 \ | |
GROUP_ID=1000 \ | |
WANDB_ENTITY=$WANDB_ENTITY \ | |
WANDB_PROJECT=$WANDB_PROJECT | |
#RUN addgroup --gid $GROUP_ID $USER_NAME | |
#RUN adduser --disabled-password \ | |
# --gecos "Non-root USER_NAME" \ | |
# --uid $USER_ID \ | |
# --gid $GROUP_ID \ | |
# --home $HOME \ | |
# $USER_NAME | |
RUN usermod -l ${USER_NAME} $(id -nu 1000) | |
RUN echo ${USER_NAME} $(id -nu 1000) | |
RUN adduser $USER_NAME sudo | |
RUN echo "$USER_NAME ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers | |
RUN echo "--> Setup ENV variables" | |
#ENV RETICULATE_PYTHON_ENV=/home/env \ | |
ENV ROOT=TRUE \ | |
#RETICULATE_MINICONDA_PATH=/home/miniconda3 \ | |
#1,2,3... En la barata solo tienes 1 :) | |
CUDA_VISIBLE_DEVICES=0\ | |
ENV_VARS=WANDB_ENTITY,WANDB_PROJECT,USER_NAME_NAME,USER_ID,GROUP_ID,PASSWORD,ROOT,CUDA_VISIBLE_DEVICES | |
### Copy deepvats | |
RUN echo "---> Setup volumes ${USER_NAME}" | |
ENV HOME="/home/${USER_NAME}" | |
RUN echo "HOME ${HOME}" | |
#ENV APPDIR='/home/'${USER_NAME_NAME}'/app' | |
ENV APPDIR=$HOME'/app' | |
ENV DATADIR=$HOME'/data/' | |
ENV DVATSDIR=$HOME'/dvats/' | |
ARG LOCAL_DATA_PATH | |
ENV LOCAL_DATA_PATH=$LOCAL_DATA_PATH | |
#--- Volumes | |
COPY --chown=${USER_ID}:${GROUP_ID} ../r_shiny_app $APPDIR | |
COPY --chown=${USER_ID}:${GROUP_ID} ${LOCAL_DATA_PATH} $DATADIR | |
COPY --chown=${USER_ID}:${GROUP_ID} ../dvats $DVATSDIR | |
WORKDIR $HOME |