Running on the Cloud#
Docker is one of the easiest ways to run Brightway on a server. The Brightway2 Dockerfile is based on the Jupyter minimal-notebook Docker file, and lets you run a notebook server or iPython shell.
To run the Brightway2 Docker file:
Run the Docker file:
docker run -d -p 8888:8888 jupyter/minimal-notebook
This will start a detached container (
-d) with port
8888 on your machine forwarded to port
8888 in the container, where the notebook server is listening.
Start an iPython shell:
docker run -i -t --entrypoint ipython cmutel/brightway2
This creates an container with STDIN open (
-i) and a TTY shell (
-t). Instead of running the
start-notebook.sh shell, this uses a different
Alternatively, start a Bash shell:
docker run -i -t --entrypoint bash cmutel/brightway2
Using Data Volumes#
The default data directory in the Docker container is
/home/jovyan/data/. You can use an existing data directory by mounting a data volume, e.g.:
docker run -i -t -v "/Users/cmutel/Library/Application Support/Brightway3":/home/jovyan/data --entrypoint ipython cmutel/brightway2
Compare the Jupyter minimal-notebook documentation for information on how to secure your server using https.
You may also want to mount the following:
directory in which the notebook server starts
output directory for most Brightway IO functions
Amazon AWS Cloud Nine (C9)#
Create an [Amazon AWS account] to use the Cloud 9 service.
Create a new C9 environment.
Download and install Brightway using the C9 terminal:
wget https://github.com/brightway-lca/brightway2/raw/master/cloud-nine-install.sh && bash cloud-nine-install.sh
Preview > Preview Running Applicationto open the introductory Brightway notebook. You can also copy/paste the URL into a new tab.