client_chatbot / Dockerfile
jashdoshi77's picture
Fix Dockerfile: replace invalid COPY with RUN mkdir for data dir
9995142
raw
history blame contribute delete
589 Bytes
FROM python:3.11-slim
# Set working directory
WORKDIR /app
# Install dependencies
COPY backend/requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
COPY backend/ ./backend/
COPY frontend/ ./frontend/
RUN mkdir -p ./data
# HF Spaces runs as user with uid 1000
RUN useradd -m -u 1000 user
RUN mkdir -p /app/data && chown -R user:user /app
USER user
# HF Spaces expects port 7860
EXPOSE 7860
# Run the FastAPI app from the backend directory
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--app-dir", "backend"]