Skip to content

Commit

Permalink
Make dockerfiles more uniform
Browse files Browse the repository at this point in the history
  • Loading branch information
jashapiro committed Aug 30, 2024
1 parent b52bcab commit 60b1b2d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions analyses/doublet-detection/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ RUN curl -L "https://github.com/conda-forge/miniforge/releases/latest/download/M
&& echo ". /opt/conda/etc/profile.d/conda.sh && conda activate base" >> ~/.bashrc

# Install conda-lock
RUN conda install --channel=conda-forge --name=base conda-lock
RUN conda install --channel=conda-forge --name=base conda-lock && conda clean --all --yes

# Install pandoc dependency
RUN apt-get -y update && \
Expand All @@ -46,8 +46,8 @@ ENV RENV_CONFIG_CACHE_ENABLED=FALSE
COPY conda-lock.yml conda-lock.yml

# restore from conda-lock.yml file and clean up to reduce image size
RUN conda-lock install -n ${ENV_NAME} conda-lock.yml && \
conda clean --all --yes
RUN conda-lock install -n ${ENV_NAME} conda-lock.yml \
&& conda clean --all --yes

# Copy the renv.lock file from the host environment to the image
COPY renv.lock renv.lock
Expand Down
6 changes: 3 additions & 3 deletions docs/ensuring-repro/docker/docker-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ RUN curl -L "https://github.com/conda-forge/miniforge/releases/latest/download/M
&& echo ". /opt/conda/etc/profile.d/conda.sh && conda activate base" >> ~/.bashrc

# Install conda-lock
RUN conda install --channel=conda-forge --name=base conda-lock
RUN conda install --channel=conda-forge --name=base conda-lock && conda clean --all --yes

# Install renv
RUN Rscript -e "install.packages('renv')"
Expand All @@ -175,8 +175,8 @@ ENV RENV_CONFIG_CACHE_ENABLED FALSE
COPY conda-lock.yml conda-lock.yml

# restore from conda-lock.yml file and clean up to reduce image size
RUN conda-lock install -n ${ENV_NAME} conda-lock.yml && \
conda clean --all --yes
RUN conda-lock install -n ${ENV_NAME} conda-lock.yml \
&& conda clean --all --yes

# Copy the renv.lock file from the host environment to the image
COPY renv.lock renv.lock
Expand Down

0 comments on commit 60b1b2d

Please sign in to comment.