File size: 544 Bytes
058f1d9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# This Dockerfile serves as the build file for Huggingface Spaces
FROM huggingface/transformers-pytorch-gpu

ARG ML_APP_LISTEN_PORT=7860
ARG ML_MLFLOW_ENDPOINT
ARG ML_HF_ACCESS_TOKEN

ENV APP_LISTEN_PORT=${ML_APP_LISTEN_PORT}
ENV MLFLOW_ENDPOINT=${ML_MLFLOW_ENDPOINT}
ENV HF_ACCESS_TOKEN=${ML_HF_ACCESS_TOKEN}

RUN apt-get update
RUN /usr/bin/python3 -m pip install uvicorn fastapi mlflow huggingface_hub httpx

WORKDIR /app

COPY ./app /app

EXPOSE ${ML_APP_LISTEN_PORT}

ENTRYPOINT [ "/usr/bin/python3", "/app/main.py" ]