quiz-api / Dockerfile
cnsq's picture
Update Dockerfile
4ff61ce verified
Raw History Blame Contribute Delete
454 Bytes
FROM python:3.12-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt /tmp/requirements.txt
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r /tmp/requirements.txt
COPY .. /app/api
EXPOSE 7860
CMD ["uvicorn", "api.main:app", "--host", "0.0.0.0", "--port", "7860"]