Skip to content

Commit 0ac3456

Browse files
committed
purge cache inbetween pip installs
1 parent 8b09734 commit 0ac3456

2 files changed

Lines changed: 11 additions & 20 deletions

File tree

.github/actions/install/action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ runs:
5353
if [[ "${{ inputs.use_vm }}" == "true" ]]; then source ~/venv/bin/activate; fi
5454
pip install --no-cache-dir --upgrade 'pip>=20'
5555
pip install --no-cache-dir --upgrade 'setuptools>=68.2.2'
56+
rm -rf ~/.cache/pip
5657
5758
- name: Print pip and setuptools versions
5859
shell: bash
@@ -68,5 +69,5 @@ runs:
6869
echo "Installing graphnet with flags: ${{ steps.flags.outputs.user_flag }} ${{ steps.flags.outputs.editable_flag }}"
6970
echo "pip install ${{ steps.flags.outputs.user_flag }} ${{ steps.flags.outputs.editable_flag }} .[torch-${{ steps.flags.outputs.torch_flag }},${{ inputs.extras }}] -f https://data.pyg.org/whl/torch-${{ inputs.torch_version }}+${{ inputs.hardware }}.html"
7071
pip install --no-cache-dir${{ steps.flags.outputs.user_flag }} ${{ steps.flags.outputs.editable_flag }} .[torch-${{ steps.flags.outputs.torch_flag }},${{ inputs.extras }}] -f https://data.pyg.org/whl/torch-${{ inputs.torch_version }}+${{ inputs.hardware }}.html
71-
72+
rm -rf ~/.cache/pip
7273
pip install --no-cache-dir git+https://github.com/thoglu/jammy_flows.git

.github/workflows/build.yml

Lines changed: 9 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,6 @@ jobs:
4545
image: icecube/icetray:icetray-devel-v1.13.0-ubuntu22.04-2025-02-12
4646

4747
steps:
48-
- name: Remove IceTray build artifacts
49-
run: |
50-
echo "Initial disk usage:"
51-
df -h
52-
53-
rm -rf /opt/icetray_src
54-
rm -rf /root/icetray/build
55-
56-
rm -rf /var/lib/apt/lists/*
57-
rm -rf /usr/share/man/*
58-
rm -rf /usr/share/doc/*
59-
rm -rf /usr/share/locale/*
60-
61-
rm -rf ~/.cache/pip /tmp/*
62-
63-
echo "Disk usage after cleanup:"
64-
df -h
6548
- name: Mimmick Docker Entrypoint
6649
# The entrypoint of the container sets python paths
6750
# Because the entrypoint is skipped by GitHub, we set it here
@@ -99,33 +82,39 @@ jobs:
9982
- name: Create virtual environment
10083
shell: bash
10184
run: |
85+
python3 -m venv ~/venv --upgrade-deps
86+
source ~/venv/bin/activate
10287
pip --version
10388
python --version
10489
pip show setuptools
105-
90+
rm -rf ~/.cache/pip
91+
10692
- name: Print available disk space before graphnet install
10793
run: |
10894
df -h
10995
- name: Upgrade packages in virtual environment
11096
shell: bash
11197
run: |
98+
source ~/venv/bin/activate
11299
pip install --no-cache-dir --upgrade astropy
113100
pip install --no-cache-dir --upgrade PyYAML
114101
pip install --no-cache-dir --upgrade psutil
115102
pip install --no-cache-dir --upgrade setuptools
116103
pip install --no-cache-dir --upgrade versioneer
117104
pip show setuptools
118105
pip show versioneer
106+
rm -rf ~/.cache/pip
119107
- name: Install package
120108
uses: ./.github/actions/install
121109
with:
122110
editable: false
123-
use_vm: false
111+
use_vm: true
124112
torch_version: ${{ matrix.torch_version }}
125113
hardware: ${{ matrix.hardware }}
126114
- name: Print packages in pip
127115
shell: bash
128116
run: |
117+
source ~/venv/bin/activate
129118
pip show torch
130119
pip show torch-geometric
131120
pip show torch-cluster
@@ -138,6 +127,7 @@ jobs:
138127
- name: Run unit tests and generate coverage report
139128
shell: bash
140129
run: |
130+
source ~/venv/bin/activate
141131
coverage run --source=graphnet -m pytest tests/ --ignore=tests/examples/04_training --ignore=tests/utilities
142132
coverage run -a --source=graphnet -m pytest tests/examples/04_training
143133
coverage run -a --source=graphnet -m pytest tests/utilities

0 commit comments

Comments
 (0)