Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pd feature/example/heat conduction greedy #20

Merged
merged 14 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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