Skip to content

Commit dd70a0e

Browse files
committed
Use base environment
1 parent 3ac0f44 commit dd70a0e

2 files changed

Lines changed: 30 additions & 10 deletions

File tree

Dockerfile

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,30 +32,27 @@ RUN apt-get update && \
3232
rm -rf /var/lib/apt/lists/*
3333

3434
# Copy the script to setup the environment
35-
RUN cp -a docker/setup_custom_env.py /opt/setup-scripts/ && \
36-
chmod +x /opt/setup-scripts/setup_custom_env.py
35+
# RUN cp -a docker/setup_custom_env.py /opt/setup-scripts/ && \
36+
# chmod +x /opt/setup-scripts/setup_custom_env.py
3737

3838
# Copy the script to activate the Conda environment
39-
RUN cp -a docker/activate-custom-env.sh /usr/local/bin/before-notebook.d/
39+
# RUN cp -a docker/activate-custom-env.sh /usr/local/bin/before-notebook.d/
4040

4141
# Switch back to the default notebook user
4242
USER ${NB_UID}
4343

44-
# Set the working directory to the repository directory
45-
# WORKDIR ${HOME}/${BASENAME}
46-
4744
# Create the Conda environment defined in environment.yml
48-
RUN mamba env create -f binder/environment.yml && \
45+
RUN mamba env update -f docker/environment.yml && \
4946
mamba clean --all -f -y && \
5047
fix-permissions "${CONDA_DIR}" && \
5148
fix-permissions "/home/${NB_USER}"
5249

5350
# Register the Jupyter kernel from the custom environment
54-
RUN /opt/setup-scripts/setup_custom_env.py ${BASENAME}
51+
# RUN /opt/setup-scripts/setup_custom_env.py ${BASENAME}
5552

5653
# Copy the IPython configuration file (binder/postBuild script)
57-
RUN mkdir -p ${HOME}/.ipython/profile_default
58-
COPY binder/ipython_config.py ${HOME}/.ipython/profile_default/
54+
RUN mkdir -p ${HOME}/.ipython/profile_default && \
55+
cp -a binder/ipython_config.py ${HOME}/.ipython/profile_default/
5956

6057
# Set the environment variable IPYTHONDIR
6158
ENV IPYTHONDIR="${HOME}/.ipython"

docker/environment.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: base
3+
channels:
4+
- conda-forge
5+
dependencies:
6+
- python=3.10
7+
- pip
8+
- pip:
9+
- numpy
10+
- matplotlib
11+
- pandas
12+
- ipywidgets
13+
- ipynbname
14+
- jupyterlab
15+
- pytest
16+
- pytest-timeout
17+
- markdown
18+
- pre-commit
19+
- geostatspy
20+
- gstools
21+
- scikit-learn
22+
- attrs
23+
- multiprocess

0 commit comments

Comments
 (0)