Skip to content

Commit

Permalink
Pd feature/example/heat conduction greedy (#20)
Browse files Browse the repository at this point in the history
* added jupyter notebook docker file

* added jupyter versions of dg_euler and poisson_global-rom

* Update README.md

* Update README.md

* added nonlinear_elasticity for dmd and prom

* Update README.md

* Update README.md

* added wave_equation and parametric_heatconduction ipynb files

* updated jupyter notebook files

* removed docker file

* Update README.md
  • Loading branch information
pravija12345 authored May 30, 2024
1 parent dda95c6 commit 78e9756
Show file tree
Hide file tree
Showing 8 changed files with 5,194 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,29 @@ python3 setup.py install --with-parallel --with-gslib --user
```
Make sure [`swig`](https://pypi.org/project/swig) is installed first. Also, the binary file must be located in `PATH` environment variable.

### pylibROM-Jupyter Docker Container

This Docker container provides an environment with Jupyter Notebook for the pylibROM library. Follow the steps below to build the Docker image and run a Jupyter Notebook server.

#### Build the Docker Image

Navigate to the directory containing the Dockerfile:
```
cd /path/to/folder/pylibROM/docker/jupyter
```

Now, run the following command to build the Docker image:

```
docker build -t pylibrom-jupyter:latest .
```

Once the image is built, you can run a container and start a Jupyter Notebook server. Replace /path/to/host/folder with the absolute path to the local directory you want to mount inside the container for Jupyter notebooks:

```
docker run -p 8888:8888 -v /path/to/host/folder:/notebooks -w /notebooks pylibrom-jupyter:latest
```


## License
pylibROM is distributed under the terms of the MIT license. All new contributions must be made under the MIT. See
Expand Down
31 changes: 31 additions & 0 deletions docker/jupyter/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# start from pylibrom docker container
FROM --platform=linux/amd64 ghcr.io/llnl/pylibrom/pylibrom_env:latest
ENV ENVDIR=env
ENV LIB_DIR=/$ENVDIR/dependencies
WORKDIR $LIB_DIR

# WORKDIR /env/dependencies
RUN sudo git clone --recursive https://github.com/LLNL/pylibROM.git
WORKDIR pylibROM
RUN sudo -E pip install ./ --global-option="--librom_dir=/env/dependencies/libROM"

# Install Jupyter Notebook
RUN sudo apt-get install -yq python3-pip
RUN sudo pip3 install jupyter

# Create a directory for Jupyter notebooks
RUN mkdir /home/$USERNAME/notebooks
WORKDIR /home/$USERNAME/notebooks

# Configure Jupyter Notebook
RUN jupyter notebook --generate-config
RUN echo "c.NotebookApp.ip = '*'" >> /home/$USERNAME/.jupyter/jupyter_notebook_config.py

# Expose the Jupyter Notebook port
EXPOSE 8888

# Run Jupyter Notebook
CMD ["jupyter", "notebook", "--ip=0.0.0.0", "--port=8888", "--no-browser", "--allow-root"]

# create and switch to a user
WORKDIR /home/$USERNAME
Loading

0 comments on commit 78e9756

Please sign in to comment.