File size: 535 Bytes
188dc40
 
 
 
 
 
4b43ab9
188dc40
 
 
4b43ab9
188dc40
 
 
4b43ab9
 
 
 
188dc40
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.10

RUN useradd -m -u 1000 user

WORKDIR /app

# Install system dependencies and any Python requirements
COPY --chown=user ./requirements.txt requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Clone transformers repo and install it
RUN git clone https://github.com/huggingface/transformers
RUN cd transformers && pip install .

# Now copy the rest of your application
COPY --chown=user . /app

# Set the correct entrypoint
CMD ["uvicorn", "index:app", "--host", "0.0.0.0", "--port", "7860"]