File tree Expand file tree Collapse file tree 2 files changed +24
-11
lines changed
Expand file tree Collapse file tree 2 files changed +24
-11
lines changed Original file line number Diff line number Diff line change 1- ARG PY_VER=3.9
2- ARG IMAGE=jupyter/docker-stacks-foundation
1+ ARG IMAGE=mambaorg/micromamba:1.5-bookworm-slim
32FROM ${IMAGE}
4- RUN conda install -y -n base -c conda-forge python=${PY_VER} git graphviz pydot && \
5- conda clean -afy
6- USER 1000
3+
4+ ARG CONDA_BIN=micromamba
5+ ARG PY_VER=3.9
6+ ARG HOST_UID=1000
7+
8+ RUN ${CONDA_BIN} install --no-pin -qq -y -n base -c conda-forge \
9+ python=${PY_VER} pip setuptools git graphviz pydot && \
10+ ${CONDA_BIN} clean -qq -afy
11+
12+ COPY --chown=${HOST_UID:-1000}:mambauser ./pyproject.toml ./README.md ./LICENSE.txt /main/
13+ COPY --chown=${HOST_UID:-1000}:mambauser ./datajoint /main/datajoint
14+
715VOLUME /src
8- WORKDIR /tmp
9- COPY --chown=1000:100 ./pyproject.toml ./README.md ./LICENSE.txt /main/
10- COPY --chown=1000:100 ./datajoint /main/datajoint
16+ WORKDIR /src
17+ USER root
1118RUN \
12- pip install --no-cache-dir /main && \
19+ chown -R ${HOST_UID:-1000}:mambauser /main && \
20+ chown -R ${HOST_UID:-1000}:mambauser /src && \
21+ eval "$(micromamba shell hook --shell bash)" && \
22+ micromamba activate base && \
23+ pip install -q --no-cache-dir /main && \
1324 rm -r /main/*
14- WORKDIR /src
25+ USER ${MAMBA_USER}
26+ ENV PATH="$PATH:/home/mambauser/.local/bin"
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ services:
4141 dockerfile : Dockerfile
4242 args :
4343 PY_VER : ${PY_VER:-3.8}
44+ HOST_UID : ${HOST_UID:-1000}
4445 depends_on :
4546 db :
4647 condition : service_healthy
@@ -60,7 +61,7 @@ services:
6061 - PYTHON_USER=dja
6162 - JUPYTER_PASSWORD=datajoint
6263 working_dir : /src
63- user : 1000:100
64+ user : ${HOST_UID:- 1000}:mambauser
6465 volumes :
6566 - .:/src
6667 djtest :
You can’t perform that action at this time.
0 commit comments