forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
29 lines (24 loc) · 894 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#---
# name: huggingface_hub
# group: llm
# depends: [python]
# test: test.py
# notes: provides `huggingface-cli` and `huggingface-downloader` tools
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# ModuleNotFoundError: No module named 'dataclasses' (on JetPack 4)
RUN pip3 install --no-cache-dir --verbose huggingface_hub[cli] && \
pip3 install --no-cache-dir --verbose dataclasses
# set the model cache dir
ENV TRANSFORMERS_CACHE=/data/models/huggingface \
HUGGINGFACE_HUB_CACHE=/data/models/huggingface \
HF_HOME=/data/models/huggingface
# add downloader tool
COPY huggingface-downloader /usr/local/bin/
COPY huggingface-downloader.py /usr/local/bin/_huggingface-downloader.py
# make sure it loads
RUN huggingface-cli --help && \
huggingface-downloader --help && \
pip3 show huggingface_hub && \
python3 -c 'import huggingface_hub; print(huggingface_hub.__version__)'