Skip to content

Commit

Permalink
Fix script to create requirements.txt
Browse files Browse the repository at this point in the history
export requirements.txt and requirements.cpu.txt from respective docker images
  • Loading branch information
dkuegler committed Sep 2, 2024
1 parent b60716f commit 3e58ed7
Show file tree
Hide file tree
Showing 4 changed files with 216 additions and 404 deletions.
12 changes: 7 additions & 5 deletions env/export_pip-r.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,23 @@ echo "Exporting versions from $2..."
echo "#"
} > $1

pip_cmd="python --version && pip list --format=freeze --no-color --all --disable-pip-version-check --no-input"
pip_cmd="python --version && pip list --format=freeze --no-color --disable-pip-version-check --no-input"
if [ "${2/#.sif}" != "$2" ]
then
# singularity
cmd="singularity exec $2 /bin/bash -c '$pip_cmd'"
cmd=("singularity" "exec" "$2" "/bin/bash" -c "$pip_cmd")
clean_cmd="singularity exec $2 /bin/bash -c '$pip_cmd'"
else
# docker
cmd="docker run --entrypoint /bin/bash $2 -c '$pip_cmd'"
clean_cmd="docker run --rm -u <user_id>:<group_id> --entrypoint /bin/bash $2 -c '$pip_cmd'"
cmd=("docker" "run" --rm -u "$(id -u):$(id -g)" --entrypoint /bin/bash "$2" -c "$pip_cmd")
fi
{
echo "# Which ran the following command:"
echo "# $cmd"
echo "# $clean_cmd"
echo "#"
} >> $1
out=$($cmd)
out=$("${cmd[@]}")
hardware=$(echo "$out" | grep "torch==" | cut -d"+" -f2)
pyversion=$(echo "$out" | head -n 1 | cut -d" " -f2)
{
Expand Down
104 changes: 104 additions & 0 deletions requirements.cpu.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#
# This file is autogenerated by kueglerd from deepmi/fastsurfer:cpu-v2.3.0
# by the following command from FastSurfer:
#
# ./requirements.cpu.txt deepmi/fastsurfer:cpu-v2.3.0
#
# Which ran the following command:
# docker run --rm -u <user_id>:<group_id> --entrypoint /bin/bash deepmi/fastsurfer:cpu-v2.3.0 -c 'python --version && pip list --format=freeze --no-color --disable-pip-version-check --no-input'
#
#
# Image was configured for cpu using python version 3.10.14
#
--extra-index-url https://download.pytorch.org/whl/cpu

# Python 3.10.14
absl-py==2.1.0
Brotli==1.1.0
cached-property==1.5.2
certifi==2024.7.4
cffi==1.17.0
charset-normalizer==3.3.2
click==8.1.7
colorama==0.4.6
contourpy==1.2.1
cycler==0.12.1
Deprecated==1.2.14
filelock==3.15.4
fonttools==4.53.1
fsspec==2024.6.1
grpcio==1.62.2
h2==4.1.0
h5py==3.11.0
hpack==4.0.0
humanize==4.10.0
hyperframe==6.0.1
idna==3.8
imagecodecs==2024.6.1
imageio==2.35.1
importlib_metadata==8.4.0
importlib_resources==6.4.4
Jinja2==3.1.4
joblib==1.4.2
kiwisolver==1.4.5
lapy==1.1.0
lazy_loader==0.4
Markdown==3.6
markdown-it-py==3.0.0
MarkupSafe==2.1.5
matplotlib==3.9.2
mdurl==0.1.2
mpmath==1.3.0
munkres==1.1.4
networkx==3.3
nibabel==5.2.1
numpy==1.26.4
packaging==24.1
pandas==2.2.2
pillow==10.4.0
pip==24.2
plotly==5.23.0
protobuf==4.25.3
psutil==6.0.0
pycparser==2.22
Pygments==2.18.0
pyparsing==3.1.4
PySide6==6.7.2
PySocks==1.7.1
python-dateutil==2.9.0
pytz==2024.1
PyWavelets==1.7.0
PyYAML==6.0.2
requests==2.32.3
rich==13.8.0
scikit-image==0.24.0
scikit-learn==1.5.1
scikit-sparse==0.4.14
scipy==1.14.1
setuptools==72.2.0
shellingham==1.5.4
shiboken6==6.7.2
SimpleITK==2.4.0
six==1.16.0
sympy==1.13.2
tenacity==9.0.0
tensorboard==2.17.1
tensorboard-data-server==0.7.0
threadpoolctl==3.5.0
tifffile==2024.8.24
torch==2.4.0+cpu
torchio==0.19.9
torchvision==0.19.0+cpu
tornado==6.4.1
tqdm==4.66.5
typer==0.12.5
typing_extensions==4.12.2
tzdata==2024.1
unicodedata2==15.1.0
urllib3==2.2.2
Werkzeug==3.0.4
wheel==0.44.0
wrapt==1.16.0
yacs==0.1.8
zipp==3.20.0
zstandard==0.23.0
Loading

0 comments on commit 3e58ed7

Please sign in to comment.