https://github.com/rodrigocaus/python-transformers
543
Repository to make Dockerfiles available for containers with Huggingface's Transformers. Build your own Docker Base Image to use Huggingface's Transformers in production.
Image tags follow the single formulation: <python_version_or_tag>-<transformers_version>-<framework>-<compatible_hardware>
Where:
Examples:
3.9-slim-4.27-torch-cpu3.10-4.29-torch-gpuRun docker build with build args to manage transformers installation.
Specify PYTHON_BASE_TAG (from official Python Docker Image) and
TRANSFORMERS_VERSION (using Pip version identification). One can
also specify EXTRA_PACKAGES to be installed with transformers[torch]:
$ export PYTHON_TAG=3.9-slim
$ export VERSION="==4.26"
$ docker build -t python-transformers \
--build-arg PYTHON_BASE_TAG=$PYTHON_TAG \
--build-arg TRANSFORMERS_VERSION=$VERSION \
--build-arg EXTRA_PACKAGES="torchvision torchaudio" \
-f Dockerfile.torch-cpu .
This image uses an official nvidia/cuda container as base image.
Specify PYTHON_VERSION and
TRANSFORMERS_VERSION (using Pip version identification). One can
also specify EXTRA_PACKAGES to be installed with transformers[torch]:
$ export PYTHON_VERSION=3.10
$ export VERSION="~=4.26"
$ docker build -t python-transformers \
--build-arg PYTHON_VERSION=$PYTHON_VERSION \
--build-arg TRANSFORMERS_VERSION=$VERSION \
--build-arg EXTRA_PACKAGES="torchvision torchaudio" \
-f Dockerfile.torch-gpu .
Content type
Image
Digest
sha256:81c433a70…
Size
4.5 GB
Last updated
over 3 years ago
docker pull rodrigocaus/python-transformers:3.10-4.29-torch-gpu