Skip to content

Commit 7479fd8

Browse files
yuhuyoyoYu Hu
andauthored
add new tools (#309)
* add new tools * use workbench python * bump python version * undo python version bump --------- Co-authored-by: Yu Hu <yuhuyoyo@verily.health>
1 parent 38aaece commit 7479fd8

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

features/src/workbench-tools/install.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,19 @@ CONDA_PACKAGES_2=(
8989
"plink2"
9090
"regenie"
9191
"vcftools"
92+
"conda-forge::google-cloud-storage"
93+
"conda-forge::ipykernel"
94+
"conda-forge::ipywidgets"
95+
"conda-forge::jupyter"
96+
"conda-forge::openai"
97+
"conda-forge::matplotlib"
98+
"conda-forge::numpy"
99+
"conda-forge::plotly"
100+
"conda-forge::pandas"
101+
"conda-forge::seaborn"
102+
"conda-forge::scikit-learn"
103+
"conda-forge::scipy"
104+
"conda-forge::tqdm"
92105
)
93106

94107
mkdir -p "${WORKBENCH_TOOLS_DIR}"
@@ -117,6 +130,12 @@ chown -R "${USERNAME}:" "${WORKBENCH_TOOLS_DIR}"
117130
# Set CROMWELL_JAR environment variable
118131
printf 'export CROMWELL_JAR="%s"\n' "${WORKBENCH_TOOLS_DIR}/2/share/cromwell/cromwell.jar"
119132

133+
# Prepend workbench-tools Python site-packages to PYTHONPATH to prevent conflicts
134+
# with base image Python environments (e.g., NeMo's Python 3.12). This ensures
135+
# workbench-tools packages and their dependencies are found first.
136+
# shellcheck disable=SC2016 # we want $PYTHONPATH to be evaluated at runtime
137+
printf 'export PYTHONPATH="%s/2/lib/python3.9/site-packages:${PYTHONPATH:-}"\n' "${WORKBENCH_TOOLS_DIR}"
138+
120139
# Make dsub a function that includes the correct PYTHONPATH. NeMo sets
121140
# PYTHONPATH so we need to override it here. We use a function instead of an
122141
# alias because aliases are not expanded in non-interactive shells.

test/test.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ if [[ "$HAS_WORKBENCH_TOOLS" == "true" ]]; then
4444
check "vep: filter_vep" "filter_vep --help > /dev/null"
4545
check "vep: variant_recoder" "variant_recoder --help | head -n10"
4646
check "vep: haplo" "haplo --help | head -n10"
47+
# Python packages (use conda python directly)
48+
check "python: google-cloud-storage" '/opt/workbench-tools/2/bin/python3 -c "import google.cloud.storage"'
49+
check "python: ipykernel" '/opt/workbench-tools/2/bin/python3 -c "import ipykernel"'
50+
check "python: ipywidgets" '/opt/workbench-tools/2/bin/python3 -c "import ipywidgets"'
51+
check "python: jupyter" '/opt/workbench-tools/2/bin/python3 -c "import jupyter"'
52+
check "python: openai" '/opt/workbench-tools/2/bin/python3 -c "import openai"'
53+
check "python: matplotlib" '/opt/workbench-tools/2/bin/python3 -c "import matplotlib"'
54+
check "python: numpy" '/opt/workbench-tools/2/bin/python3 -c "import numpy"'
55+
check "python: plotly" '/opt/workbench-tools/2/bin/python3 -c "import plotly"'
56+
check "python: pandas" '/opt/workbench-tools/2/bin/python3 -c "import pandas"'
57+
check "python: seaborn" '/opt/workbench-tools/2/bin/python3 -c "import seaborn"'
58+
check "python: scikit-learn" '/opt/workbench-tools/2/bin/python3 -c "import sklearn"'
59+
check "python: scipy" '/opt/workbench-tools/2/bin/python3 -c "import scipy"'
60+
check "python: tqdm" '/opt/workbench-tools/2/bin/python3 -c "import tqdm"'
4761
fi
4862

4963
# The postgres-client feature should install these

0 commit comments

Comments
 (0)