Skip to content

Commit

Permalink
add requirements file
Browse files Browse the repository at this point in the history
  • Loading branch information
NicholasCote committed Aug 2, 2024
1 parent 6233861 commit 2f6858a
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
27 changes: 27 additions & 0 deletions notebooks/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Use the latest official micromamba image as the base image
FROM python:slim

# Update apt and install git
RUN apt-get update && apt-get install -y git-all

# Set the working directory in the container to /home/mambauser/app
WORKDIR /home/mambauser/app

# Run git clone to get the repo contents in to /home/mambauser/app
RUN git clone https://github.com/NicholasCote/ERA5_interactive-cookbook-ncote.git

# Create a conda environment from the environment.yml file included in the repo
RUN pip install -r ERA5_interactive-cookbook-ncote/notebooks/requirements.txt
# Activate the environment by providing ENV_NAME as an environment variable at runtime

# Copy the notebook with the panel application to the working directory
RUN mv ERA5_interactive-cookbook-ncote/notebooks/04_dashboard.ipynb .

# Remove the rest of the repository as no other files are required
RUN rm -r ERA5_interactive-cookbook-ncote/

# Make panel application port to the world outside this container
EXPOSE 5006

# Specify the command to run that starts the application
CMD ["panel", "serve", "04_dashboard.ipynb", "--allow-websocket-origin=*", "--autoreload"]
8 changes: 8 additions & 0 deletions notebooks/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
dask
datashader
fsspec
hvplot
nbconvert
panel
xarray
zarr

0 comments on commit 2f6858a

Please sign in to comment.