-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
67 additions
and
1,242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,15 @@ | |
# https://github.com/2i2c-org/infrastructure/issues/1444#issuecomment-1187405324 | ||
|
||
FROM pangeo/pangeo-notebook:2024.10.01 | ||
# FROM 935462133478.dkr.ecr.us-east-2.amazonaws.com/teehr:v0.4-beta | ||
|
||
USER root | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV PATH ${NB_PYTHON_PREFIX}/bin:$PATH | ||
|
||
ARG AWS_ACCESS_KEY_ID | ||
ARG AWS_SECRET_ACCESS_KEY | ||
# # For local testing | ||
# ARG AWS_ACCESS_KEY_ID | ||
# ARG AWS_SECRET_ACCESS_KEY | ||
|
||
# Needed for apt-key to work | ||
RUN apt-get update -qq --yes > /dev/null && \ | ||
|
@@ -46,7 +48,7 @@ RUN wget -q "https://sourceforge.net/projects/turbovnc/files/${TURBOVNC_VERSION} | |
&& ln -s /opt/TurboVNC/bin/* /usr/local/bin/ \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN mamba install -n ${CONDA_ENV} -y websockify voila | ||
RUN mamba install -n ${CONDA_ENV} -y websockify ipywidgets-bokeh | ||
|
||
# Install jupyter-remote-desktop-proxy with compatible npm version | ||
RUN export PATH=${NB_PYTHON_PREFIX}/bin:${PATH} \ | ||
|
@@ -60,38 +62,22 @@ RUN pip install 'teehr @ git+https://github.com/RTIInternational/[email protected] | |
# Install git-lfs | ||
RUN apt-get update && apt-get install git-lfs -y | ||
|
||
# Install jupyter-server-proxy? | ||
|
||
# # Download FEWS binaries from s3? | ||
# RUN aws s3 cp s3://ciroh-rti-hefs-data/fews-NA-202102-115469-bin.zip /opt/fews/fews-NA-202102-115469-bin.zip | ||
# RUN unzip /opt/fews/fews-NA-202102-115469-bin.zip -d /opt/fews/ | ||
|
||
# Copy in FEWS binaries from local directory | ||
COPY fews/fews-NA-202102-115469-bin.zip /opt/fews/fews-NA-202102-115469-bin.zip | ||
RUN unzip /opt/fews/fews-NA-202102-115469-bin.zip -d /opt/fews/ \ | ||
&& chown -R jovyan:jovyan /opt/fews | ||
|
||
RUN mkdir /opt/data \ | ||
&& chown -R jovyan:jovyan /opt/data | ||
|
||
# Copy in the python notebook and scripts | ||
|
||
# IPywidgets | ||
# COPY scripts/dashboard.ipynb scripts/dashboard_funcs.py scripts/start_dashboard.sh /opt/hefs_fews_dashboard/ | ||
# COPY images/index_getting_started.svg /opt/hefs_fews_dashboard/index_getting_started.svg | ||
# COPY images/CIROHLogo_200x200.png /opt/hefs_fews_dashboard/CIROHLogo_200x200.png | ||
# Panel | ||
COPY playground/panel_dashboard.py playground/dashboard_funcs.py playground/start_dashboard.sh /opt/hefs_fews_dashboard/ | ||
COPY playground/geo/rfc_boundaries.geojson /opt/hefs_fews_dashboard/rfc_boundaries.geojson | ||
COPY images/index_getting_started.svg /opt/hefs_fews_dashboard/index_getting_started.svg | ||
# COPY images/index_getting_started.svg /opt/hefs_fews_dashboard/index_getting_started.svg | ||
COPY images/dashboard_icon2.png /opt/hefs_fews_dashboard/dashboard_icon2.png | ||
COPY images/CIROHLogo_200x200.png /opt/hefs_fews_dashboard/CIROHLogo_200x200.png | ||
RUN chown -R jovyan:jovyan /opt/hefs_fews_dashboard && chmod +x /opt/hefs_fews_dashboard/start_dashboard.sh | ||
COPY playground/panel_requirements.txt /opt/hefs_fews_dashboard/ | ||
RUN pip install -r /opt/hefs_fews_dashboard/panel_requirements.txt | ||
|
||
# Create Desktop dir and copy in the dashboard desktop file | ||
COPY scripts/dashboard.desktop /opt/hefs_fews_dashboard/dashboard.desktop | ||
RUN chmod +x /opt/hefs_fews_dashboard/dashboard.desktop | ||
|
||
RUN chown -R jovyan:jovyan /opt/hefs_fews_dashboard && chmod +x /opt/hefs_fews_dashboard/start_dashboard.sh \ | ||
&& chmod +x /opt/hefs_fews_dashboard/dashboard.desktop | ||
|
||
# Install Firefox | ||
RUN wget -P Downloads https://ftp.mozilla.org/pub/firefox/releases/131.0b9/linux-x86_64/en-US/firefox-131.0b9.tar.bz2 \ | ||
|
@@ -107,18 +93,18 @@ RUN wget -P Downloads https://ftp.mozilla.org/pub/firefox/releases/131.0b9/linux | |
# $$ echo 'Package: *Pin: origin packages.mozilla.orgPin-Priority: 1000' | tee /etc/apt/preferences.d/mozilla \ | ||
# && apt-get update && apt-get install firefox -y | ||
|
||
# COPY playground/jupyter-panel-proxy.yml /opt/hefs_fews_dashboard/jupyter-panel-proxy.yml | ||
# COPY playground/jupyter-panel-proxy.yml /etc/jupyter/jupyter-panel-proxy.yml | ||
# RUN jupyter server extension enable panel.io.jupyter_server_extension | ||
|
||
# ENV BOKEH_ALLOW_WS_ORIGIN "*" | ||
|
||
# Run the web service on container startup. | ||
# CMD panel serve /opt/hefs_fews_dashboard/panel_dashboard.py --allow-websocket-origin="*" --port 8888 --autoreload --address 0.0.0.0 --static-dirs | ||
# For local testing | ||
# RUN chown -R jovyan:jovyan .aws | ||
|
||
USER ${NB_USER} | ||
|
||
RUN aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID \ | ||
&& aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY \ | ||
&& aws configure set default.region us-east-2 | ||
# # For local testing | ||
# RUN aws configure set aws_access_key_id $AWS_ACCESS_KEY_ID \ | ||
# && aws configure set aws_secret_access_key $AWS_SECRET_ACCESS_KEY \ | ||
# && aws configure set default.region us-east-2 | ||
|
||
WORKDIR /home/jovyan |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# jupyter-panel-proxy.yml | ||
apps: | ||
- /opt/hefs_fews_dashboard/panel_dashboard.py | ||
command: panel serve /opt/hefs_fews_dashboard/panel_dashboard.py --port 8888 --allow-websocket-origin="*" | ||
absolute-url: True |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.