| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5c2b583 commit 7b88626
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,26 +13,26 @@ RUN cat /colab_requirements.txt >> /requirements.txt | |||
| 13 | 13 | RUN cat /kaggle_requirements.txt >> /requirements.txt | |
| 14 | 14 | ||
| 15 | 15 | # Install Kaggle packages | |
| 16 | - RUN uv pip install --system -r /requirements.txt | ||
| 16 | + RUN uv pip install --system --no-cache -r /requirements.txt | ||
| 17 | 17 | ||
| 18 | 18 | # Install manual packages: | |
| 19 | 19 | # b/183041606#comment5: the Kaggle data proxy doesn't support these APIs. If the library is missing, it falls back to using a regular BigQuery query to fetch data. | |
| 20 | - RUN uv pip uninstall --system google-cloud-bigquery-storage | ||
| 20 | + RUN uv pip uninstall --system --no-cache google-cloud-bigquery-storage | ||
| 21 | 21 | ||
| 22 | 22 | # uv cannot install this in requirements.txt without --no-build-isolation | |
| 23 | 23 | # to avoid affecting the larger build, we'll post-install it. | |
| 24 | - RUN uv pip install --no-build-isolation --system "git+https://github.com/Kaggle/learntools" | ||
| 24 | + RUN uv pip install --no-build-isolation --no-cache --system "git+https://github.com/Kaggle/learntools" | ||
| 25 | 25 | ||
| 26 | 26 | # newer daal4py requires tbb>=2022, but libpysal is downgrading it for some reason | |
| 27 | - RUN uv pip install --system "tbb>=2022" "libpysal==4.9.2" | ||
| 27 | + RUN uv pip install --system --no-cache "tbb>=2022" "libpysal==4.9.2" | ||
| 28 | 28 | ||
| 29 | 29 | # b/404590350: Ray and torchtune have conflicting tune cli, we will prioritize torchtune. | |
| 30 | 30 | # b/315753846: Unpin translate package, currently conflicts with adk 1.17.0 | |
| 31 | 31 | # b/468379293: Unpin Pandas once cuml/cudf are compatible, version 3.0 causes issues | |
| 32 | 32 | # b/468383498: numpy will auto-upgrade to 2.4.x, which causes issues with numerous packages | |
| 33 | 33 | # b/468367647: Unpin protobuf, version greater than v5.29.5 causes issues with numerous packages | |
| 34 | - RUN uv pip install --system --force-reinstall --no-deps torchtune "google-cloud-translate==3.12.1" "numpy==2.0.2" "pandas==2.2.2" | ||
| 35 | - RUN uv pip install --system --force-reinstall "protobuf==5.29.5" | ||
| 34 | + RUN uv pip install --system --force-reinstall --no-cache --no-deps torchtune "google-cloud-translate==3.12.1" "numpy==2.0.2" "pandas==2.2.2" | ||
| 35 | + RUN uv pip install --system --force-reinstall --no-cache "protobuf==5.29.5" | ||
| 36 | 36 | ||
| 37 | 37 | # Adding non-package dependencies: | |
| 38 | 38 | ADD clean-layer.sh /tmp/clean-layer.sh | |
@@ -43,7 +43,7 @@ ARG PACKAGE_PATH=/usr/local/lib/python3.12/dist-packages | |||
| 43 | 43 | ||
| 44 | 44 | # Install GPU-specific non-pip packages. | |
| 45 | 45 | {{ if eq .Accelerator "gpu" }} | |
| 46 | - RUN uv pip install --system "pycuda" | ||
| 46 | + RUN uv pip install --system --no-cache "pycuda" | ||
| 47 | 47 | {{ end }} | |
| 48 | 48 | ||
| 49 | 49 | ||
@@ -64,7 +64,8 @@ ADD patches/keras_internal.py \ | |||
| 64 | 64 | $PACKAGE_PATH/tensorflow_decision_forests/keras/ | |
| 65 | 65 | ||
| 66 | 66 | RUN apt-get install -y libfreetype6-dev && \ | |
| 67 | - apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing | ||
| 67 | + apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \ | ||
| 68 | + /tmp/clean-layer.sh | ||
| 68 | 69 | ||
| 69 | 70 | RUN mkdir -p /usr/share/nltk_data && \ | |
| 70 | 71 | # NLTK Downloader no longer continues smoothly after an error, so we explicitly list | |
@@ -106,7 +107,8 @@ RUN mkdir -p /root/.EasyOCR/model && \ | |||
| 106 | 107 | /tmp/clean-layer.sh | |
| 107 | 108 | ||
| 108 | 109 | # Tesseract and some associated utility packages | |
| 109 | - RUN apt-get install tesseract-ocr -y | ||
| 110 | + RUN apt-get install tesseract-ocr -y && \ | ||
| 111 | + /tmp/clean-layer.sh | ||
| 110 | 112 | ||
| 111 | 113 | ENV TESSERACT_PATH=/usr/bin/tesseract \ | |
| 112 | 114 | # For Facets, we also include an empty path to include $PWD. | |
@@ -124,7 +126,8 @@ RUN mkdir -p /root/.jupyter && touch /root/.jupyter/jupyter_nbconvert_config.py | |||
| 124 | 126 | ||
| 125 | 127 | # install imagemagick for wand | |
| 126 | 128 | # https://docs.wand-py.org/en/latest/guide/install.html#install-imagemagick-on-debian-ubuntu | |
| 127 | - RUN apt-get install libmagickwand-dev | ||
| 129 | + RUN apt-get install libmagickwand-dev && \ | ||
| 130 | + /tmp/clean-layer.sh | ||
| 128 | 131 | ||
| 129 | 132 | # Override default imagemagick policies | |
| 130 | 133 | ADD patches/imagemagick-policy.xml /etc/ImageMagick-6/policy.xml | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,8 +10,6 @@ | |||
| 10 | 10 | set -e | |
| 11 | 11 | set -x | |
| 12 | 12 | ||
| 13 | - # Delete files that pip caches when installing a package. | ||
| 14 | - rm -rf /root/.cache/pip/* | ||
| 15 | 13 | # Delete old downloaded archive files | |
| 16 | 14 | apt-get autoremove -y | |
| 17 | 15 | # Delete downloaded archive files | |
| Back | FazBrowse Home | New Git URL |
0 commit comments