Skip to content

Commit

Permalink
Build docker images for tokenizers main
Browse files Browse the repository at this point in the history
Fix

Rerebase.
  • Loading branch information
LysandreJik authored and Narsil committed Sep 26, 2022
1 parent c20b2c7 commit 72b49c6
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- docker-image*
- test-tokenizers-*
repository_dispatch:
workflow_call:
inputs:
Expand Down Expand Up @@ -42,7 +43,7 @@ jobs:
build-args: |
REF=main
push: true
tags: huggingface/transformers-all-latest-gpu${{ inputs.image_postfix }}
tags: huggingface/transformers-all-latest-gpu-tokenizers-main

latest-with-torch-nightly-docker:
name: "Nightly PyTorch + Stable TensorFlow"
Expand Down Expand Up @@ -179,7 +180,7 @@ jobs:
build-args: |
REF=main
push: true
tags: huggingface/transformers-pytorch-gpu
tags: huggingface/internal-transformers-pytorch-gpu-tokenizers-main

latest-tensorflow:
name: "Latest TensorFlow [dev]"
Expand Down Expand Up @@ -207,4 +208,4 @@ jobs:
build-args: |
REF=main
push: true
tags: huggingface/transformers-tensorflow-gpu
tags: huggingface/internal-transformers-tensorflow-gpu-tokenizers-main
11 changes: 10 additions & 1 deletion docker/transformers-all-latest-gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ ARG INTEL_TORCH_EXT='1.11.0'
ARG CUDA='cu113'

RUN apt update
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg git-lfs
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg git-lfs curl libssl-dev
RUN git lfs install
RUN python3 -m pip install --no-cache-dir --upgrade pip

Expand Down Expand Up @@ -53,3 +53,12 @@ RUN python3 -m pip install --no-cache-dir decord
# When installing in editable mode, `transformers` is not recognized as a package.
# this line must be added in order for python to be aware of transformers.
RUN cd transformers && python3 setup.py develop

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN cargo --help
RUN python3 -m pip uninstall -y tokenizers
RUN git clone https://github.com/huggingface/tokenizers
RUN python3 -m pip install --no-cache-dir setuptools-rust
RUN python3 -m pip install --no-cache-dir ./tokenizers/bindings/python
11 changes: 10 additions & 1 deletion docker/transformers-pytorch-deepspeed-latest-gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG PYTORCH='1.12.1'
ARG CUDA='cu113'

RUN apt -y update
RUN apt install -y libaio-dev
RUN apt install -y libaio-dev curl libssl-dev
RUN python3 -m pip install --no-cache-dir --upgrade pip

ARG REF=main
Expand All @@ -33,3 +33,12 @@ RUN DS_BUILD_CPU_ADAM=1 DS_BUILD_FUSED_ADAM=1 DS_BUILD_AIO=1 DS_BUILD_UTILS=1 py
RUN cd transformers && python3 setup.py develop

RUN python3 -c "from deepspeed.launcher.runner import main"

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN cargo --help
RUN python3 -m pip uninstall -y tokenizers
RUN git clone https://github.com/huggingface/tokenizers
RUN python3 -m pip install --no-cache-dir setuptools-rust
RUN python3 -m pip install --no-cache-dir ./tokenizers/bindings/python
11 changes: 10 additions & 1 deletion docker/transformers-pytorch-gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LABEL maintainer="Hugging Face"
ARG DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg curl libssl-dev
RUN python3 -m pip install --no-cache-dir --upgrade pip

ARG REF=main
Expand All @@ -29,3 +29,12 @@ RUN python3 -m pip install -U "itsdangerous<2.1.0"
# When installing in editable mode, `transformers` is not recognized as a package.
# this line must be added in order for python to be aware of transformers.
RUN cd transformers && python3 setup.py develop

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN cargo --help
RUN python3 -m pip uninstall -y tokenizers
RUN git clone https://github.com/huggingface/tokenizers
RUN python3 -m pip install --no-cache-dir setuptools-rust
RUN python3 -m pip install --no-cache-dir ./tokenizers/bindings/python
11 changes: 10 additions & 1 deletion docker/transformers-tensorflow-gpu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ LABEL maintainer="Hugging Face"
ARG DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg
RUN apt install -y git libsndfile1-dev tesseract-ocr espeak-ng python3 python3-pip ffmpeg curl libssl-dev
RUN python3 -m pip install --no-cache-dir --upgrade pip

ARG REF=main
Expand All @@ -21,3 +21,12 @@ RUN python3 -m pip install -U "itsdangerous<2.1.0"
# When installing in editable mode, `transformers` is not recognized as a package.
# this line must be added in order for python to be aware of transformers.
RUN cd transformers && python3 setup.py develop

RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"

RUN cargo --help
RUN python3 -m pip uninstall -y tokenizers
RUN git clone https://github.com/huggingface/tokenizers
RUN python3 -m pip install --no-cache-dir setuptools-rust
RUN python3 -m pip install --no-cache-dir ./tokenizers/bindings/python

0 comments on commit 72b49c6

Please sign in to comment.