-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (20 loc) · 721 Bytes
/
Copy pathDockerfile
File metadata and controls
26 lines (20 loc) · 721 Bytes
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
FROM huggingface/transformers-pytorch-cpu:latest
COPY ./ /app
WORKDIR /app
# install requirements
RUN pip install "dvc[gdrive]"
RUN pip install -r requirements_prod.txt
RUN pip install --upgrade huggingface-hub
# initialise dvc
RUN dvc init --no-scm
# configuring remote server in dvc
RUN dvc remote add -d storage gdrive://1O-6JApTdpJKF3tIYtfl8uV4Huh1QwuG-
RUN dvc remote modify storage gdrive_use_service_account true
RUN dvc remote modify storage gdrive_service_account_json_file_path creds.json
# # pulling the trained model
RUN dvc pull dvcfiles/trained_model.ckpt.dvc
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
# # running the application
EXPOSE 8000
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]