Skip to content

Commit

Permalink
slightly faster startup by downloading BERTje model ahead of time
Browse files Browse the repository at this point in the history
  • Loading branch information
bbonf committed Oct 4, 2023
1 parent 6aa8798 commit dbf1d0e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,8 @@ ENV FLASK_APP=app.py
# Shows print logs from our server in the container logs.
ENV PYTHONUNBUFFERED=1

# Download BERTje model ahead of time
RUN python -c 'from transformers import pipeline; pipeline("fill-mask", model="GroNLP/bert-base-dutch-cased")'

# Run the Flask server
CMD ["flask", "run", "--host=0.0.0.0"]

0 comments on commit dbf1d0e

Please sign in to comment.