File size: 1,280 Bytes
8a60d30 6e140c3 c0aaa20 9a74349 8a60d30 c0aaa20 8a60d30 9a74349 8a60d30 |
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 |
# Copyright (c) 2024 NVIDIA Corporation. All rights reserved.
FROM nvcr.io/nvidia/physicsnemo/physicsnemo:25.08
# Install Earth-2 Studio
RUN pip install jupyterlab
RUN python -m pip install --upgrade pip setuptools wheel
RUN apt update && apt install ffmpeg -y
RUN pip install --no-cache-dir --no-deps -e git+https://github.com/NVIDIA/[email protected]#egg=makani
RUN pip install --no-cache-dir "earth2studio==0.5.0"
RUN pip install --no-cache-dir cartopy mlflow
USER root
# Create non-root user and set up directories
RUN useradd -m -u 1001 user && \
mkdir -p /home/user/.cache /home/user/.config /home/user/.local /home/user/.local/share/jupyter && \
chmod -R 777 /home/user && \
mkdir /mhd-demo && chown user:user /mhd-demo && chmod 777 /mhd-demo
USER user
ENV HOME=/home/user
ENV PATH=/home/user/.local/bin:$PATH
# Install required python packages
RUN pip3 install gdown ipympl cdsapi
RUN pip3 install --upgrade nbconvert
WORKDIR /e2s
COPY --chown=user Earth2Studio_P1.ipynb /e2s/
COPY --chown=user start_server.sh /
RUN mkdir outputs && chown user:user outputs && chmod 777 outputs
COPY --chown=user login.html /usr/local/lib/python3.12/dist-packages/jupyter_server/templates/login.html
RUN chmod +x /start_server.sh
CMD ["/start_server.sh"] |