-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (27 loc) · 969 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
FROM mambaorg/micromamba:latest
# Copy over env/config files
COPY --chown=$MAMBA_USER:$MAMBA_USER build-environment.yaml /tmp/build-environment.yaml
COPY --chown=$MAMBA_USER:$MAMBA_USER web-environment.yaml /tmp/web-environment.yaml
COPY --chown=$MAMBA_USER:$MAMBA_USER empack_config.yaml /tmp/empack_config.yaml
# create base and web conda envs
RUN micromamba install -n base \
--yes --file /tmp/build-environment.yaml \
&& \
micromamba create \
--yes \
--platform=emscripten-32 \
--file /tmp/web-environment.yaml && \
micromamba clean --all --yes
# activate env
ARG ENV_NAME=base
ARG MAMBA_DOCKERFILE_ACTIVATE=1
# pack pyjs dependencies
RUN mkdir -p /tmp/build/empack
RUN empack pack env \
--env-prefix=$MAMBA_ROOT_PREFIX/envs/web \
--relocate-prefix=/ \
--no-use-cache \
--outdir=/tmp/build/empack \
--config=empack_config.yaml && \
cp -r $MAMBA_ROOT_PREFIX/envs/web/lib_js/pyjs/. /tmp/build
RUN mkdir runtime