Skip to content

Commit 2b124d7

Browse files
committed
again
1 parent 80fba2e commit 2b124d7

File tree

10 files changed

+16
-98
lines changed

10 files changed

+16
-98
lines changed

Dockerfile.tmpl

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ARG GPU_BASE_IMAGE_NAME
55
ARG LIGHTGBM_VERSION
66
ARG TORCH_VERSION
77
ARG TORCHAUDIO_VERSION
8-
ARG TORCHTEXT_VERSION
98
ARG TORCHVISION_VERSION
109
ARG JAX_VERSION
1110

@@ -47,7 +46,6 @@ ENV TENSORFLOW_IO_VERSION=0.37.0
4746
ARG LIGHTGBM_VERSION
4847
ARG TORCH_VERSION
4948
ARG TORCHAUDIO_VERSION
50-
ARG TORCHTEXT_VERSION
5149
ARG TORCHVISION_VERSION
5250
ARG JAX_VERSION
5351

@@ -62,7 +60,6 @@ ENV KMP_SETTINGS=false
6260
ENV PIP_ROOT_USER_ACTION=ignore
6361

6462
ADD clean-layer.sh /tmp/clean-layer.sh
65-
ADD patches/keras_patch.sh /tmp/keras_patch.sh
6663
ADD patches/nbconvert-extensions.tpl /opt/kaggle/nbconvert-extensions.tpl
6764
ADD patches/template_conf.json /opt/kaggle/conf.json
6865

@@ -89,6 +86,7 @@ RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list &
8986
apt-get install -y build-essential unzip cmake libboost-dev libboost-system-dev libboost-filesystem-dev p7zip-full && \
9087
# b/182601974: ssh client was removed from the base image but is required for packages such as stable-baselines.
9188
apt-get install -y openssh-client && \
89+
apt-get install -y graphviz && pip install graphviz && \
9290
/tmp/clean-layer.sh
9391

9492
# b/128333086: Set PROJ_LIB to points to the proj4 cartographic library.
@@ -125,7 +123,7 @@ RUN pip install spacy && \
125123
COPY --from=torch_whl /tmp/whl/*.whl /tmp/torch/
126124
RUN mamba install -y -c pytorch magma-cuda${CUDA_MAJOR_VERSION}${CUDA_MINOR_VERSION} && \
127125
pip install /tmp/torch/*.whl && \
128-
# b/255757999 openmp (libomp.so) is an dependency of libtorchtext and libtorchaudio but
126+
# b/255757999 openmp (libomp.so) is an dependency libtorchaudio but
129127
mamba install -y openmp && \
130128
rm -rf /tmp/torch && \
131129
/tmp/clean-layer.sh
@@ -134,8 +132,7 @@ RUN pip install \
134132
torch==$TORCH_VERSION+cpu \
135133
torchvision==$TORCHVISION_VERSION+cpu \
136134
torchaudio==$TORCHAUDIO_VERSION+cpu \
137-
torchtext==$TORCHTEXT_VERSION \
138-
-f https://download.pytorch.org/whl/torch_stable.html && \
135+
--index-url https://download.pytorch.org/whl/cpu && \
139136
/tmp/clean-layer.sh
140137
{{ end }}
141138

@@ -203,15 +200,13 @@ RUN pip install \
203200
"tensorflow-io==${TENSORFLOW_IO_VERSION}" \
204201
tensorflow-probability \
205202
tensorflow_decision_forests \
203+
tensorflow-text \
206204
"tensorflow_hub>=0.16.0" \
207205
# b/331799280 remove once other packages over to dm-tre
208206
optree \
209207
tf-keras && \
210208
/tmp/clean-layer.sh
211209

212-
RUN chmod +x /tmp/keras_patch.sh && \
213-
/tmp/keras_patch.sh
214-
215210
ADD patches/keras_internal.py /opt/conda/lib/python3.10/site-packages/tensorflow_decision_forests/keras/keras_internal.py
216211
ADD patches/keras_internal_test.py /opt/conda/lib/python3.10/site-packages/tensorflow_decision_forests/keras/keras_internal_test.py
217212

@@ -221,12 +216,13 @@ RUN pip install "keras>3" keras-cv keras-nlp && \
221216
# b/328788268 libpysal 4.10 seems to fail with "module 'shapely' has no attribute 'Geometry'. Did you mean: 'geometry'"
222217
RUN pip install pysal "libpysal==4.9.2"
223218

219+
# b/350573866 xgboost v2.1.0 breaks learntools
224220
RUN apt-get install -y libfreetype6-dev && \
225221
apt-get install -y libglib2.0-0 libxext6 libsm6 libxrender1 libfontconfig1 --fix-missing && \
226222
pip install gensim \
227223
textblob \
228224
wordcloud \
229-
xgboost \
225+
"xgboost==2.0.3" \
230226
pydot \
231227
hep_ml && \
232228
# NLTK Project datasets
@@ -272,7 +268,6 @@ RUN pip install "scipy==1.12.0" \
272268
datashader \
273269
# Boruta (python implementation)
274270
Boruta && \
275-
apt-get install -y graphviz && pip install graphviz && \
276271
# Pandoc is a dependency of deap
277272
apt-get install -y pandoc && \
278273
pip install essentia
@@ -471,8 +466,8 @@ RUN pip install bleach \
471466
widgetsnbextension \
472467
# Require pyarrow newer than https://github.com/advisories/GHSA-5wvp-7f3h-6wmm
473468
{{ if eq .Accelerator "gpu" }} pyarrow {{ else }} "pyarrow>=14.0.1" {{ end }} \
474-
feather-format \
475-
fastai
469+
feather-format && \
470+
pip install --no-deps fastai fastcore fastdownload
476471

477472
RUN python -m spacy download en_core_web_sm && python -m spacy download en_core_web_lg && \
478473
apt-get update && apt-get install -y ffmpeg && \

Jenkinsfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ pipeline {
3636
--package torch \
3737
--version $TORCH_VERSION \
3838
--build-arg TORCHAUDIO_VERSION=$TORCHAUDIO_VERSION \
39-
--build-arg TORCHTEXT_VERSION=$TORCHTEXT_VERSION \
4039
--build-arg TORCHVISION_VERSION=$TORCHVISION_VERSION \
4140
--build-arg CUDA_MAJOR_VERSION=$CUDA_MAJOR_VERSION \
4241
--build-arg CUDA_MINOR_VERSION=$CUDA_MINOR_VERSION \

config.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ GPU_BASE_IMAGE_NAME=tf2-gpu.2-16.py310
55
LIGHTGBM_VERSION=4.2.0
66
TORCH_VERSION=2.4.0
77
TORCHAUDIO_VERSION=2.4.0
8-
TORCHTEXT_VERSION=0.18.0
98
TORCHVISION_VERSION=0.19.0
109
JAX_VERSION=0.4.26
1110
CUDA_MAJOR_VERSION=12

packages/torch.Dockerfile

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ FROM ${BASE_IMAGE} AS builder
44

55
ARG PACKAGE_VERSION
66
ARG TORCHAUDIO_VERSION
7-
ARG TORCHTEXT_VERSION
87
ARG TORCHVISION_VERSION
98
ARG CUDA_MAJOR_VERSION
109
ARG CUDA_MINOR_VERSION
@@ -63,18 +62,6 @@ RUN sudo apt-get update && \
6362
RUN sed -i 's/set(envs/set(envs\n "LIBS=-ltinfo"/' /usr/local/src/audio/third_party/sox/CMakeLists.txt
6463
RUN cd /usr/local/src/audio && python setup.py bdist_wheel
6564

66-
# Build torchtext
67-
# Instructions: https://github.com/pytorch/text#building-from-source
68-
# See comment above for PYTORCH_BUILD_VERSION.
69-
ENV BUILD_VERSION=$TORCHTEXT_VERSION
70-
RUN cd /usr/local/src && \
71-
git clone https://github.com/pytorch/text && \
72-
cd text && \
73-
git checkout tags/v$TORCHTEXT_VERSION && \
74-
git submodule sync && \
75-
git submodule update --init --recursive --jobs 1 && \
76-
python setup.py bdist_wheel
77-
7865
# Build torchvision.
7966
# Instructions: https://github.com/pytorch/vision/tree/main#installation
8067
# See comment above for PYTORCH_BUILD_VERSION.
@@ -93,7 +80,6 @@ FROM alpine:latest
9380
RUN mkdir -p /tmp/whl/
9481
COPY --from=builder /usr/local/src/pytorch/dist/*.whl /tmp/whl
9582
COPY --from=builder /usr/local/src/audio/dist/*.whl /tmp/whl
96-
COPY --from=builder /usr/local/src/text/dist/*.whl /tmp/whl
9783
COPY --from=builder /usr/local/src/vision/dist/*.whl /tmp/whl
9884

9985
# Print out the built .whl file.

patches/keras_patch.sh

Lines changed: 0 additions & 41 deletions
This file was deleted.

tests/test_geopandas.py

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import unittest
22

33
import geopandas
4+
from shapely.geometry import Polygon
45

56
class TestGeopandas(unittest.TestCase):
6-
def test_read(self):
7-
df = geopandas.read_file(geopandas.datasets.get_path('nybb'))
8-
self.assertTrue(df.size > 1)
9-
10-
def test_spatial_join(self):
11-
cities = geopandas.read_file(geopandas.datasets.get_path('naturalearth_cities'))
12-
world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
13-
countries = world[['geometry', 'name']]
14-
countries = countries.rename(columns={'name':'country'})
15-
cities_with_country = geopandas.sjoin(cities, countries, how="inner", op='intersects')
16-
self.assertTrue(cities_with_country.size > 1)
7+
def test_GeoSeries(self):
8+
p1 = Polygon([(0, 0), (1, 0), (1, 1)])
9+
p2 = Polygon([(0, 0), (1, 0), (1, 1), (0, 1)])
10+
p3 = Polygon([(2, 0), (3, 0), (3, 1), (2, 1)])
11+
g = geopandas.GeoSeries([p1, p2, p3])

tests/test_torchtext.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

tests/test_xgboost.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ def test_classifier(self):
2121
xgb1.fit(
2222
X_train, y_train,
2323
eval_set=[(X_train, y_train), (X_test, y_test)],
24-
eval_metric='mlogloss',
24+
eval_metric='mlogloss'
2525
)
2626
self.assertIn("validation_0", xgb1.evals_result())

tpu/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ ARG TENSORFLOW_VERSION
1313
ARG TF_LIBTPU_VERSION
1414
ARG JAX_VERSION
1515
ARG TORCHVISION_VERSION
16-
ARG TORCHTEXT_VERSION
1716
ARG TORCHAUDIO_VERSION
1817

1918
ENV ISTPUVM=1
@@ -60,7 +59,7 @@ RUN apt-get update && apt-get install ffmpeg libsm6 libxext6 -y
6059
# Additional useful packages should be added here
6160

6261
RUN pip install tensorflow_hub https://storage.googleapis.com/cloud-tpu-tpuvm-artifacts/tensorflow/tf-${TENSORFLOW_VERSION}/tensorflow-${TENSORFLOW_VERSION}-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${TF_LINUX_WHEEL_VERSION}.whl tensorflow-probability tensorflow-io \
63-
torch~=${TORCH_VERSION} https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-${TORCH_VERSION}+libtpu-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${TORCH_LINUX_WHEEL_VERSION}.whl torchvision==${TORCHVISION_VERSION} torchtext==${TORCHTEXT_VERSION} torchaudio==${TORCHAUDIO_VERSION} \
62+
torch~=${TORCH_VERSION} https://storage.googleapis.com/pytorch-xla-releases/wheels/tpuvm/torch_xla-${TORCH_VERSION}+libtpu-${PYTHON_WHEEL_VERSION}-${PYTHON_WHEEL_VERSION}-${TORCH_LINUX_WHEEL_VERSION}.whl torchvision==${TORCHVISION_VERSION} torchaudio==${TORCHAUDIO_VERSION} \
6463
jax[tpu]==${JAX_VERSION} -f https://storage.googleapis.com/jax-releases/libtpu_releases.html trax flax optax git+https://github.com/deepmind/dm-haiku jraph distrax \
6564
papermill jupyterlab python-lsp-server[all] "jupyter-lsp==1.5.1" \
6665
pandas matplotlib opencv-python-headless librosa accelerate diffusers scikit-learn transformers \

tpu/config.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ JAX_VERSION=0.4.23
1212
TORCH_VERSION=2.3.0
1313
# https://github.com/pytorch/audio supports nightly
1414
TORCHAUDIO_VERSION=2.3.0
15-
# https://github.com/pytorch/text supports main
16-
TORCHTEXT_VERSION=0.18.0
1715
# https://github.com/pytorch/vision supports nightly
1816
TORCHVISION_VERSION=0.18.0
1917
TORCH_LINUX_WHEEL_VERSION=manylinux_2_28_x86_64

0 commit comments

Comments
 (0)