forked from BIM2SIM/bim2sim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (18 loc) · 821 Bytes
/
Dockerfile
File metadata and controls
27 lines (18 loc) · 821 Bytes
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
ARG PYTHON_VERSION=3.9
FROM mambaorg/micromamba:2.0.2
# Redeclare the ARG after FROM, but don't set a default value
ARG PYTHON_VERSION
# Set the Python version as an environment variable
ENV PYTHON_VERSION=${PYTHON_VERSION}
# Copy the environment file
COPY --chown=$MAMBA_USER:$MAMBA_USER env.yaml /tmp/env.yaml
RUN echo "Python version argument: ${PYTHON_VERSION}"
# Modify the env.yaml file to include the specified Python version
RUN micromamba install -y -n base -c conda-forge python=${PYTHON_VERSION} pythonocc-core=7.7.0 pip gcc git --retry-clean-cache && \
micromamba clean --all --yes
# Copy files
COPY --chown=$MAMBA_USER:$MAMBA_USER . .
ARG MAMBA_DOCKERFILE_ACTIVATE=1
ENV PIP_DEFAULT_TIMEOUT=500
# Install the package
RUN pip install --no-cache-dir '.' -i https://pypi.tuna.tsinghua.edu.cn/simple