This Code Ocean Compute Capsule will allow you to run and reproduce the results of Mask Gen on your local machine1. Follow the instructions below, or consult our knowledge base for more information. Don't hesitate to reach out to Support if you have any questions.
1 You may need access to additional hardware and/or software licenses.
- Docker Community Edition (CE)
- nvidia-container-runtime for code that leverages the GPU
In order to fetch the Data Asset(s) this Capsule depends on, download them into the Capsule's data folder:
- mask-training-2025-05-23 should be downloaded to
data/mask-training-2025-05-23 - 754615-mask-training-data should be downloaded to
data/754615-mask-training-data - mask-training-data-2025-05-13 should be downloaded to
data/mask-training-data-2025-05-13 - 751474_mask-result-2025-06-02 should be downloaded to
data/751474_mask-result-2025-06-02 - mask-training-data-2025-05-14 should be downloaded to
data/mask-training-data-2025-05-14 - mask-training-2025-05-31 should be downloaded to
data/mask-training-2025-05-31 - mask-training-2025-05-15 should be downloaded to
data/mask-training-2025-05-15 - 754615_mask-result-2025-06-02 should be downloaded to
data/754615_mask-result-2025-06-02 - mask-result-2025-06-02 should be downloaded to
data/mask-result-2025-06-02 - mask-training-2025-05-16 should be downloaded to
data/mask-training-2025-05-16
In your terminal, execute the following command, providing your password or API key when prompted for it:
docker login -u cameron.arshadi@alleninstitute.org registry.codeocean.allenneuraldynamics.orgIn your terminal, navigate to the folder where you've extracted the Capsule and execute the following command, adjusting parameters as needed:
docker run --platform linux/amd64 --rm --gpus all \
--workdir /code \
--volume "$PWD/code":/code \
--volume "$PWD/data":/data \
--volume "$PWD/results":/results \
--env AWS_ACCESS_KEY_ID=value \
--env AWS_SECRET_ACCESS_KEY=value \
--env AWS_DEFAULT_REGION=value \
registry.codeocean.allenneuraldynamics.org/capsule/8732c547-1336-4261-a682-fd53c9f61786 \
bash run '<S3_ZARR_PATH|TILE_JSON_PATH>' '<INFERENCE_CHANNEL>'The first argument can be either a parent zarr path or a JSON file containing a tile_paths list. For example:
bash run '<S3_ZARR_PATH>' '<INFERENCE_CHANNEL>'
bash run /data/tile_000006.json 561As secrets are required, replace all value occurances with your personal credentials prior to your run.