NeuroScope / Dockerfile
Gaurav711's picture
build: Remove build-time weight download to fix Hugging Face secret mounting error
a1c317b
Raw
History Blame Contribute Delete
623 Bytes
FROM python:3.11-slim
WORKDIR /app
# System dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
&& rm -rf /var/lib/apt/lists/*
# Install Python dependencies
COPY backend/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy backend source
COPY backend/ ./backend/
# HF Spaces requires port 7860
ENV PORT=7860
ENV PYTHONPATH=/app/backend
# Model weights are loaded and cached dynamically at runtime to keep builds fast and stable.
WORKDIR /app/backend
# Run the FastAPI server
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]