2ns / Dockerfile
proti0070's picture
Rename Dockerfile (5) to Dockerfile
873032e verified
raw
history blame contribute delete
500 Bytes
FROM python:3.11-slim
RUN apt-get update && apt-get install -y \
curl git build-essential \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY backend/ backend/
COPY frontend/ frontend/
# HF Spaces runs as uid 1000
RUN useradd -m -u 1000 user
RUN mkdir -p /workspace/projects && chown -R user:user /app /workspace
USER user
EXPOSE 7860
CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "7860"]