Parcourir la source

feat: cache huggingface gpt2 tokenizer files (#1138)

tags/0.3.21
takatost il y a 2 ans
Parent
révision
877da82b06
Aucun compte lié à l'adresse e-mail de l'auteur
1 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 3
    1
      api/Dockerfile

+ 3
- 1
api/Dockerfile Voir le fichier

@@ -26,7 +26,7 @@ EXPOSE 5001

WORKDIR /app/api

RUN apt-get update \
RUN apt-get update \
&& apt-get install -y --no-install-recommends bash curl wget vim nodejs \
&& apt-get autoremove \
&& rm -rf /var/lib/apt/lists/*
@@ -34,6 +34,8 @@ RUN apt-get update \
COPY --from=base /pkg /usr/local
COPY . /app/api/

RUN python -c "from transformers import GPT2TokenizerFast; GPT2TokenizerFast.from_pretrained('gpt2')"

COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh


Chargement…
Annuler
Enregistrer