openenv / Dockerfile
AnkushRaheja's picture
Upload 22 files
042e419 verified
raw
history blame contribute delete
400 Bytes
FROM python:3.11-slim
# Non-root user required by Hugging Face Spaces
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Install dependencies first (better layer caching)
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY --chown=appuser:appuser . .
USER appuser
EXPOSE 7860
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]