Dockerfile 914 Bytes
Newer Older
1
2
3
4
5
6
FROM python:3.8
LABEL maintainer="Hugging Face"

RUN apt update
RUN git clone https://github.com/huggingface/transformers

7
RUN python3 -m pip install --no-cache-dir --upgrade pip && python3 -m pip install --no-cache-dir git+https://github.com/huggingface/doc-builder ./transformers[dev]
8
9
RUN apt-get -y update && apt-get install -y libsndfile1-dev && apt install -y tesseract-ocr

10
11
12
# Torch needs to be installed before deepspeed
RUN python3 -m pip install --no-cache-dir ./transformers[deepspeed]

13
RUN python3 -m pip install --no-cache-dir torchvision git+https://github.com/facebookresearch/detectron2.git pytesseract
14
15
RUN python3 -m pip install -U "itsdangerous<2.1.0"

Yih-Dar's avatar
Yih-Dar committed
16
17
# Test if the image could successfully build the doc. before publishing the image
RUN doc-builder build transformers transformers/docs/source/en --build_dir doc-build-dev --notebook_dir notebooks/transformers_doc --clean
18
RUN rm -rf doc-build-dev