- ORF307: Optimization (undergraduate)
- ORF522: Linear and Nonlinear Optimization (graduate)
- Install docker Desktop from here
Option 1: Download the ZIP file (recommended for beginners)
- Download the ZIP file of this repository
- Extract/unzip the downloaded file to a location of your choice
Option 2: Clone the repository (for Git users)
git clone https://github.com/bstellato/optimization-docker.git
cd optimization-dockerThe easiest way to run this image is using Docker Compose:
-
Go to folder where you unpacked the startup files
-
Double-click the appropriate file for your operating system:
On Mac:
- Double-click the
start-jupyter-mac.commandfile - When you see the security warning "Apple could not verify...", go to System Preferences → Security & Privacy and click "Open Anyway"
On Windows:
- Double-click the
Start-Jupyter-Windows.batfile
On Linux:
- Double-click the
start-jupyter-linux.desktopfile - If needed, right-click the file first, select Properties, and check "Allow executing file as program" in the Permissions tab
- Some Linux distributions may require you to mark the file as trusted before executing
- Double-click the
This will start Jupyter Lab in the background, open your browser automatically, and provide you with the connection link.
This repository uses a Docker image from dockerhub.
When using Docker Compose (recommended), the image will be automatically pulled the first time you run it.
If you prefer to use Docker directly:
-
You can manually pull the image first (optional):
docker pull bstellato/optimization-docker:main
-
Then run it from the terminal:
docker run -it --rm -p 8888:8888 -v $HOME:/home/jovyan/work bstellato/optimization-docker:main
- From the Windows command prompt run:
docker run -v %USERPROFILE%:/home/jovyan/work -p 8888:8888 bstellato/optimization-docker:main
Open the link http://127.0.0.1:8888/lab and you will have the Jupyterlab session running. Remember to shut it down File -> Shut Down when you are done.
If you are getting an error running the image (e.g., "port is already allocation") you should kill the existing docker containers.
If you're using Docker Compose, you can stop all containers with:
docker compose downBoth start scripts (shell script for Mac/Linux and batch file for Windows) display this command when you start the server.
You can see running containers by running docker ps.
You will see the docker containers as follows:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
db8b31714ae7 optimization-docker "tini -g -- start.sh…" 3 minutes ago Up 3 minutes (healthy) 0.0.0.0:8888->8888/tcp pedantic_haslett
Take the name of the container you would like to close and run, in this case, docker kill pedantic_haslett.
To build the image run
docker build --rm --tag bstellato/optimization-docker .