GamedAreS's picture
Made more changes to Dockerfile to properly build
0a3739d
raw
history blame contribute delete
574 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential curl git \
&& rm -rf /var/lib/apt/lists/*
# Create non-root user (HF runs as uid 1000)
RUN useradd -m -u 1000 appuser
WORKDIR /app
# Install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY . .
# Set ownership
RUN chown -R appuser:appuser /app
USER appuser
ENV PYTHONUNBUFFERED=1
ENV PYTHONPATH=/app
EXPOSE 8000
CMD ["uvicorn", "server.app:app", "--host", "0.0.0.0", "--port", "8000"]