Instructions to use AbdulElahGwaith/transformers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AbdulElahGwaith/transformers with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AbdulElahGwaith/transformers", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download docker/transformers-gpu/Dockerfile from AbdulElahGwaith/transformers: direct link, hf CLI and curl.
- Browser
- Download file 931 Bytes
-
https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/docker/transformers-gpu/Dockerfile
- Command line
-
hf download hf://AbdulElahGwaith/transformers/docker/transformers-gpu/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/AbdulElahGwaith/transformers/resolve/main/docker/transformers-gpu/Dockerfile
931 Bytes
| FROM nvidia/cuda:10.2-cudnn7-devel-ubuntu18.04 | |
| LABEL maintainer="Hugging Face" | |
| LABEL repository="transformers" | |
| RUN apt update && \ | |
| apt install -y bash \ | |
| build-essential \ | |
| git \ | |
| curl \ | |
| ca-certificates \ | |
| python3 \ | |
| python3-pip && \ | |
| rm -rf /var/lib/apt/lists | |
| RUN python3 -m pip install --no-cache-dir --upgrade pip && \ | |
| python3 -m pip install --no-cache-dir \ | |
| jupyter \ | |
| torch | |
| RUN python3 -m pip install --no-cache-dir git+https://github.com/huggingface/kernels@main#egg=kernels | |
| RUN git clone https://github.com/NVIDIA/apex | |
| RUN cd apex && \ | |
| python3 setup.py install && \ | |
| pip install -v --no-cache-dir --global-option="--cpp_ext" --global-option="--cuda_ext" ./ | |
| WORKDIR /workspace | |
| COPY . transformers/ | |
| RUN cd transformers/ && \ | |
| python3 -m pip install --no-cache-dir . | |
| CMD ["/bin/bash"] | |