Merry99's picture
Restore: Space paused fixes - memory optimization and error handling
9a12dde
raw
history blame contribute delete
476 Bytes
FROM python:3.10-slim
WORKDIR /app
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
COPY requirements.txt .
RUN apt-get update && apt-get install -y --no-install-recommends build-essential libgomp1 && \
pip install --upgrade pip && \
pip install -r requirements.txt && \
apt-get purge -y build-essential && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
COPY . .
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]