This repository includes a Docker script containing all the necessary dependencies for conducting simulations with IcePack. To begin, download the zip file by clicking the green Code
button above, and then follow these instructions. If you are still getting familiar with working in a terminal, I recommend watching this video first.
These instructions will guide you in setting up and running the project on your local machine for development and testing purposes.
To follow the examples, you must have Docker installed on your system. Please note that this process is compatible with Windows 10 Education or Professional but not Windows 10 Home.
After installation, open cmder
, navigate to Settings (Win+Alt+P) ➡ Import, and select the cmlab.xml
file provided in the repository.
Once Docker is installed and running, open CMDER/terminal and execute the following commands:
If you are using Windows, please change the line-endings(CRLF/LF) for the *.sh
files in the docker folder before proceeding.
Open the *.sh
files in VSCode, and you can change CRLF to LF by clicking on CRLF present on the lower right side in the status bar.
- To install the Icepack command-line interface, run the following commands:
cd /path/to/this/repo
cd docker
docker build --target base -t icepack .
- To install the Jupyter notebook interface, execute these commands:
cd /path/to/this/repo
cd docker
docker build --target notebook -t icepack_notebook .
Note: Replace the variable /path/to/this/repo
with the path to the folder containing the Dockerfile. For example, if your code is in D:\Codes\fenics-docker-master
, run: cd D:\Codes\fenics-docker-master
After building the Docker image, you can start the command-line interface by running the following command:
docker run -v host_system_path:/root/ -w /root/ -it icepack
To launch the notebook, use the following command:
docker run -p 8888:8888 -v host_system_path:/root/ -w /root/ icepack_notebook
Note: Replace the variable host_system_path
with the path to your code's folder. For example, if your code is in D:\Codes
, to start the command-line interface, run:
docker run -v D:\Codes:/root/ -w /root/ -it icepack
For Mac,
docker run -v ~/codes:/root/ -w /root/ -it icepack