-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use two-stage image with micromamba for cells
- Loading branch information
Showing
6 changed files
with
77 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
ARG BUILD_IMAGE | ||
ARG RUNTIME_IMAGE | ||
|
||
FROM ${BUILD_IMAGE} AS build | ||
# When building actual cells, extra dependencies are installed here: | ||
# COPY environment.yaml . | ||
# RUN micromamba install -y -n venv -f environment.yaml | ||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
USER root | ||
RUN conda-pack -p /opt/conda/envs/venv -o /tmp/env.tar && \ | ||
mkdir /venv && \ | ||
cd /venv && \ | ||
tar xf /tmp/env.tar && \ | ||
rm /tmp/env.tar | ||
RUN /venv/bin/conda-unpack | ||
|
||
FROM ${RUNTIME_IMAGE} AS runtime | ||
COPY --from=build /venv /venv | ||
WORKDIR /app | ||
# When building actual cells, we copy files to the cell. In the tests, we use a | ||
# volume mount | ||
# COPY my-task-name.R . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM mambaorg/micromamba:1.5.6 | ||
RUN micromamba install -y -n base -c conda-forge conda-pack | ||
ARG CONDA_ENV_FILE | ||
COPY ${CONDA_ENV_FILE} environment.yaml | ||
RUN micromamba create -y -f environment.yaml && \ | ||
micromamba clean --all --yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
FROM ubuntu:24.04 |
This file was deleted.
Oops, something went wrong.