Spaces:
Running
on
Zero
Running
on
Zero
| # 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/modulus-makani.git@v0.1.0#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"] |