File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ RUN uv pip install --system --no-cache "pycuda"
4444
4545# Use a fixed apt-get repo to stop intermittent failures due to flaky httpredir connections,
4646# as described by Lionel Chan at http://stackoverflow.com /a/37426929/5881346
47+ RUN /tmp/clean-layer.sh
4748RUN sed -i " s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list && \
4849 apt-get update --allow-releaseinfo-change && \
4950 # Needed by lightGBM (GPU build)
Original file line number Diff line number Diff line change @@ -17,4 +17,12 @@ apt-get clean
1717# Ensures the current working directory won't be deleted
1818cd /usr/local/src/
1919# Delete source files used for building binaries
20- rm -rf /usr/local/src/*
20+ rm -rf /usr/local/src/*
21+
22+ # More clean up to save disk space
23+ rm -rf /var/lib/apt/lists/*
24+ find /tmp -mindepth 1 ! -name ' clean-layer.sh' -delete 2> /dev/null || true
25+ rm -rf /root/.cache
26+ rm -rf /var/cache/apt/archives/*
27+ find /usr -name ' *.pyc' -delete 2> /dev/null || true
28+ find /usr -name ' __pycache__' -type d -exec rm -rf {} + 2> /dev/null || true
You can’t perform that action at this time.
0 commit comments