Invoice / Dockerfile
Corin1998's picture
Update Dockerfile
cb42aa5 verified
raw
history blame contribute delete
321 Bytes
FROM python:3.11-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . /app
# HF Spaces は $PORT を割り当ててくる
ENV PORT=7860
EXPOSE 7860
CMD ["sh", "-c", "uvicorn main:app --host 0.0.0.0 --port $PORT"]