Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions 01-Introduction_Leaf_Optics.ipynb

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions Docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Environment build stage
# Using miniconda image to build the required image
FROM condaforge/mambaforge:latest AS build
# Install conda-pack
RUN mamba install conda-pack && mamba config --set remote_read_timeout_secs 600
# Create the conda environment using environment.yml file
COPY environment.yml .
RUN mamba env create -f environment.yml
# Package the environment as tar using conda-pack
RUN conda-pack -n multiply -o /tmp/env.tar && \
mkdir /venv && cd /venv && tar -xf /tmp/env.tar && \
rm /tmp/env.tar
# Unpack the environment in /venv using conda-unpack
RUN /venv/bin/conda-unpack
# Runtime stage
# using slim debian image as the base image for the environment
FROM debian:bullseye-slim AS runtime
# Copy the environment directory /venv from the build stage:
COPY --from=build /venv /venv
COPY . /tmp/multiply

EXPOSE 8888
SHELL ["/bin/bash", "-c"]
ENTRYPOINT source /venv/bin/activate && \
cd /tmp/multiply && \
jupyter lab --no-browser --ip=0.0.0.0 --port=8888 \
--allow-root --NotebookApp.token=''
15 changes: 6 additions & 9 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
name: mcmc_env
name: multiply
channels:
- conda-forge
dependencies:
- python<=3.10
- numpy
- scipy
- jupyter
- matplotlib
- seaborn
- jupyterlab
- matplotlib-base
- matplotlib-inline
- ipywidgets
- ipykernel
- ipympl
- ipywidgets
- ipyleaflet
- pandas
- gdal
- tqdm
- libgdal
- netCDF4
- seaborn
- pip
- pip:
- pcse
- git+https://github.com/jgomezdans/GomezEngine
- git+https://github.com/jgomezdans/gp_emulator
- https://github.com/jgomezdans/gp_emulator/archive/refs/tags/1.6.5.zip
- prosail