forked from spectrochempy/spectrochempy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (30 loc) · 1.13 KB
/
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
33
34
35
36
37
38
39
40
41
# Choose the minimal jupyter image: https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html
FROM jupyter/base-notebook:latest
USER root
RUN sudo apt-get update -y && \
sudo apt-get install -y libx11-6
USER $NB_UID
# Choose python 3.9 version
ARG PY_VERSION=3.9
ARG DEV=''
ARG DASH=''
ARG CANTERA=''
ARG OSQP=''
ARG BRANCH=''
# ENV CONDA_ENV scpy$PY_VERSION
# We will first create a YAML file and then use it to update the environment
# to be suitable for spectrochempy
COPY --chown=${NB_UID}:${NB_GID} .ci/scripts/env* /home/$NB_USER/tmp/
RUN cd /home/$NB_USER/tmp/ && \
conda update conda && \
conda install -c conda-forge mamba jinja2 && \
python env_create.py -v $PY_VERSION $DEV $DASH $CANTERA $OSQP scpy$PY_VERSION.yml && \
# mamba env create -p $CONDA_DIR/envs/$CONDA_ENV -f scpy$PY_VERSION.yml && \
mamba env update --name base -f scpy$PY_VERSION.yml && \
conda clean --all -f -y && \
rm -rf /home/$NB_USER/tmp
# Install spectrochempy
COPY --chown=${NB_UID}:${NB_GID} . /home/$NB_USER/spectrochempy/
RUN cd spectrochempy && \
git checkout $BRANCH && \
python -m pip install .