-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update Dockerfiles and image build script to match output * Add full Dockerfile * Update Docker docs
- Loading branch information
Showing
6 changed files
with
77 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,12 +9,23 @@ You can reach us at [AllenCenterCovertLab](mailto:[email protected] | |
|
||
See [docs/README.md](docs/README.md) for more info on setting up and running the model. | ||
|
||
In short, there are two alternative setups to run the model: inside a Docker container vs. in a manually constructed `pyenv` virtual environment. | ||
|
||
In short, there are two alternative setups to run the model: inside a Docker container vs. in a manually constructed `pyenv` virtual environment. With Docker, you can start running a simulation with three commands: | ||
1. Pull the Docker image: | ||
```shell script | ||
docker pull docker.pkg.github.com/covertlab/wholecellecolirelease/wcm-full:latest | ||
``` | ||
1. Run the Docker container: | ||
```shell script | ||
docker run --name=wcm -it --rm docker.pkg.github.com/covertlab/wholecellecolirelease/wcm-full | ||
``` | ||
1. Inside the container, run the model: | ||
```shell script | ||
python runscripts/manual/runSim.py | ||
``` | ||
|
||
## Quick start | ||
|
||
When running this code, prepare with these steps (the wcm-code Docker container already prepares this for you): | ||
When running this code, prepare with these steps (the wcm-full Docker container already prepares this for you): | ||
|
||
1. `cd` to the top level of your `wcEcoli` directory. | ||
2. Set the `$PYTHONPATH`: | ||
|
@@ -46,7 +57,7 @@ These scripts have command line interfaces built on Python's `argparse`, so you | |
**NOTE:** _Use the `-h` or `--help` switch to get complete, up-to-date documentation on the command line options._ Below are just _some_ of the command line options. | ||
|
||
|
||
To run the parameter calculator (ParCa), which is needed to prepare input data for the simulation: | ||
To run the parameter calculator (ParCa), which is needed to prepare input data for the simulation (this step has already been run when building the wcm-full Docker image and can be skipped if running a container from that image): | ||
```bash | ||
python runscripts/manual/runFitter.py [-h] [--cpus CPUS] [sim_outdir] | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,22 @@ | ||
#!/bin/sh | ||
#! /usr/bin/env bash | ||
# Build the WCM Docker container images locally. | ||
# | ||
# ASSUMES: The current working dir is the wcEcoli/ project root. | ||
|
||
set -eu | ||
|
||
# On macOS, build with `NO_AVX2=1` to avoid the OpenBLAS 0.3.6+ self-test failures | ||
# and bad results when building with Docker Desktop on macOS. | ||
if [ "$(uname -s)" == Darwin ]; then NO_AVX2=1; else NO_AVX2=0; fi | ||
|
||
# Docker image #1: The Python runtime environment. | ||
docker build -f cloud/docker/runtime/Dockerfile -t wcm-runtime . | ||
docker build -f cloud/docker/runtime/Dockerfile -t wcm-runtime \ | ||
--build-arg NO_AVX2=$NO_AVX2 . | ||
|
||
# Docker image #2: The Whole Cell Model code on the runtime environment. | ||
# See this Dockerfile for usage instructions. | ||
docker build -f cloud/docker/wholecell/Dockerfile -t wcm-code . | ||
|
||
# Docker image #3: The Whole Cell Model code with parameters calculated, ready for sims. | ||
# See this Dockerfile for usage instructions. | ||
docker build -f cloud/docker/full/Dockerfile -t wcm-full . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Container image #3: wcm-full. | ||
# This Dockerfile builds a container image with the full Whole Cell Model, ready | ||
# to run simulations, layered on the wcm-code image. | ||
# | ||
# To build locally from the wcEcoli/ project root directory: | ||
# | ||
# > docker build -f cloud/docker/full/Dockerfile -t wcm-full . | ||
# | ||
# After building locally you can start up a new container from the image: | ||
# | ||
# > docker run --name wcm -it --rm wcm-full | ||
# | ||
# It will start a shell where you can execute commands: | ||
# | ||
# # nosetests | ||
# | ||
# If this succeeds you should be good to go, e.g.: | ||
# | ||
# # python runscripts/manual/runSim.py | ||
|
||
|
||
ARG from=wcm-code:latest | ||
FROM ${from} | ||
|
||
RUN python runscripts/manual/runFitter.py | ||
|
||
CMD ["/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters