17 lines
425 B
Docker
17 lines
425 B
Docker
FROM python:3.12-slim
|
|
|
|
WORKDIR /app
|
|
|
|
ENV PYTHONPATH=/app
|
|
ENV HF_HOME=/root/.cache/huggingface
|
|
ENV CUDA_VISIBLE_DEVICES=""
|
|
|
|
COPY api/requirements.txt /app/api-requirements.txt
|
|
|
|
RUN pip install --no-cache-dir --extra-index-url https://download.pytorch.org/whl/cpu torch==2.7.0 && \
|
|
pip install --no-cache-dir -r /app/api-requirements.txt
|
|
|
|
COPY . /app
|
|
|
|
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "8080"]
|