Spaces:
Running
Running
File size: 644 Bytes
134d7d4 04a59d8 134d7d4 885660c | 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 27 28 29 30 31 32 33 34 35 36 37 38 | FROM python:3.12-slim
RUN useradd -m -u 1000 user
WORKDIR /app
COPY --chown=user:user requirements.txt /app/requirements.txt
RUN pip install \
--no-cache-dir \
--upgrade \
pip
RUN pip install \
--no-cache-dir \
-r /app/requirements.txt
RUN python -c "import transformers, huggingface_hub, torch; \
print('transformers:', transformers.__version__); \
print('huggingface_hub:', huggingface_hub.__version__); \
print('torch:', torch.__version__)"
COPY --chown=user:user . /app
USER user
ENV HOME=/home/user
ENV PATH=/home/user/.local/bin:$PATH
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |