Skip to content

Commit

Permalink
refactor: move repo under user directory in docker
Browse files Browse the repository at this point in the history
  • Loading branch information
YifuTao committed Oct 2, 2024
1 parent 0e3df44 commit df07d77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .docker/.env
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
UID=1000
GID=1000
UNAME=docker_dev
HOST_SPIRES_DATA_DIR=~/data/oxford_spires_dataset
HOME_DIR=/home
SPIRES_DIR=${HOME_DIR}/oxford_spires_dataset
SPIRES_DIR=${HOME_DIR}/${UNAME}/oxford_spires_dataset
SPIRES_DATA_DIR=${SPIRES_DIR}/data
4 changes: 2 additions & 2 deletions .docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ ENV UNAME=docker_dev
RUN addgroup --gid $GID $UNAME
RUN adduser --disabled-password --gecos '' --uid $UID --gid $GID $UNAME

ARG SPIRES_DIR=/home/oxford_spires_dataset
ARG SPIRES_DIR=/home/${UNAME}/oxford_spires_dataset
WORKDIR ${SPIRES_DIR}

COPY ./requirements.txt ${SPIRES_DIR}/requirements.txt
Expand All @@ -151,7 +151,7 @@ RUN mkdir /home/${UNAME}/.cache

# Make the outputs of the container match the host

RUN chown -R ${UID}:${GID} ${SPIRES_DIR}
RUN chown -R ${UID}:${GID} /home/${UNAME}
USER ${UNAME}
RUN echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;33m\]\u@docker-\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '" >> ~/.bashrc
RUN echo "alias recon_benchmark=\"python ${SPIRES_DIR}/scripts/reconstruction_benchmark/main.py\"" >> ~/.bashrc
Expand Down

0 comments on commit df07d77

Please sign in to comment.