SF_FastAPI / Dockerfile
COCODEDE04's picture
Create Dockerfile
929335e verified
raw
history blame
517 Bytes
FROM python:3.10-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install --no-cache-dir -r /app/requirements.txt
# Copy the code and model
COPY app.py /app/app.py
COPY best_model.h5 /app/best_model.h5
COPY means_std.json /app/means_std.json
EXPOSE 7860
# Run FastAPI (this is the crucial line!)
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]