This guide covers CohortContrast deployment on air-gapped servers where internet access is not available at runtime.
It applies to both Python-backed workflows:
runCohortContrastViewer() (GUI)precomputeSummary() (summary-mode artifacts)installPythonDeps() against online
package indexes..whl) for
all required Python dependencies.Use a machine that matches the target server runtime (OS, architecture, Python version).
mkdir -p /tmp/ccv_wheels/linux_x86_64
python3 -m pip download \
--dest /tmp/ccv_wheels/linux_x86_64 \
dash dash-bootstrap-components dash-ag-grid \
pandas pyarrow numpy scipy \
plotly diskcache psutil multiprocess \
scikit-learn scikit-learn-extra
# Optional: compress for transfer
cd /tmp/ccv_wheels
zip -r linux_x86_64.zip linux_x86_64Supported offline layouts for
installPythonDepsOffline():
packagesDir/linux_x86_64.zippackagesDir/linux_x86_64/*.whlCopy either:
linux_x86_64.zip into a directory such as
/opt/cohortcontrast/packages, or/opt/cohortcontrast/packages/linux_x86_64/*.whl.If virtual environments are available:
configurePython(
pythonPath = "/usr/bin/python3",
virtualenvName = "r-cohortcontrast-viewer",
createVenv = TRUE
)If venv/ensurepip is unavailable on the
server:
When pip is available
If there is no pip available
simple: minimal logging/noise; good for local ad hoc
use.server: file logging and stable hosted operation;
recommended on air-gapped servers.debug: maximum diagnostics; use for troubleshooting
only.Optional export lockdown (common in controlled environments):
not a supported wheel on this platform:
venv/ensurepip errors:
createVenv = FALSE and system Python.checkPythonDeps(), verify wheel directory
contents, reinstall with installPythonDepsOffline().pythonPath in
configurePython(...).mode = "server" and set logFile
explicitly.137 (killed/OOM):
minibatchKMeansCutoffPatients to force scalable
clustering earlier.configurePython(...) with explicit interpreter.installPythonDepsOffline(...).checkPythonDeps().precomputeSummary(...) and
runCohortContrastViewer(...) smoke tests.