Creating the building docker image

From DISI
Jump to navigation Jump to search

Building Pipeline Docker & Apptainer Images

Brendan created a Dockerfile for the building pipeline to simplify the flow of submission and reduce the number of intermediate files created, to speed up building when carried out on Beegfs.

This page describes how to create the building pipeline Docker image (on gimel/epyc/etc) and the Apptainer image (on Wynton).

---

A note on open source

Beginning ~Dec 12, 2025 we are beginning to transition away from ChemAxon and OpenEye commercial licenses to use open source tools for our building pipeline. The following instructions will work for both commercial and open source versions. If you have access to the commercial tools, build the docker container with --target full (you can still run the open source software with this image, it will just default to commercial software). If you do not have the commercial tools, build the docker container with --target oss.

On epyc

  1. Clone the version of the zinc22-3d building pipeline you want. For the official version corresponding with the current dock3-release, follow the zinc22-3d link from the dock3-release GitHub.
  2. Run:
cd zinc22-3d
docker build -t [image_name] \
  --target [oss/full] \
  --build-context base=[base_dir] \
  --build-arg OPENBABEL_VERSION_NUMBER=[version_number] \
  --build-context jchem_license_folder=[jchem_license_folder] \
  --build-context openeye_license_folder=[openeye_folder] .

Arguments

  • [oss/full]
    • oss for open source version
    • full for commercial version
  • image_name
    • The name of the docker image to make.
    • If you are creating the image for everyone in the lab to use, name this building_pipeline.
    • For testing, use a different name.
  • base_dir

This is the folder that contains:

/soft/jchem-latest
/soft/dock-latest
/soft/corina-latest
/soft/openbabel-latest
/soft/extralibs-latest
/soft/pyenv-latest
  • version_number

The version of OpenBabel referenced in:

/soft/openbabel-latest/lib/openbabel/[version_number]
/soft/openbabel-latest/share/openbabel/[version_number]
  • jchem_license_folder

The folder that contains the JChem license file (license.cxl). (Only required for commercial building)

  • openeye_folder

The folder that contains the OpenEye license file (oe_license.txt). (Only required for commercial building)

---

Example (for lab-wide use only)

docker build -t building_pipeline \
  --target full \
  --build-context base=/mnt/nfs/soft/dock/versions/dock385/pipeline_3D_ligands \
  --build-arg OPENBABEL_VERSION_NUMBER=2.3.1 \
  --build-context jchem_license_folder=/nfs/soft/jchem \
  --build-context openeye_license_folder=/nfs/soft/openeye .

Note: Only use the name building_pipeline if you are creating the image for everyone. For testing, please use a different name.

---

Deploying the Docker Image

This will create the building pipeline image on the node you built it on. You now need to load it onto all compute nodes. Run this from an NFS directory (to make sure the logs are saved correctly):

/mnt/nfs/exk/work/bwhall61/deploy_building_pipeline_docker/deploy_image.sh [image_name]

This will queue jobs to load the docker image on all of the compute nodes.

---

Transferring to Wynton

  1. Save it as a .tar file:
docker save -o [image_name].tar [image_name]
  1. Transfer the .tar file to Wynton.
  1. Build an Apptainer .sif image from it:
apptainer build [image_name].sif docker-archive://[image_name].tar

This will give you an Apptainer .sif file which can then be used for the building pipeline.