StockPred-Backend / Dockerfile
Anurag33Gaikwad's picture
Update Dockerfile
9526b4e verified
Raw
History Blame
569 Bytes
FROM python:3.10-slim
# System deps (needed for numpy / pandas / tensorflow)
RUN apt-get update && apt-get install -y \
build-essential \
curl \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code
# Fix Python path for imports
ENV PYTHONPATH=/code
# Install Python deps
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# Copy app
COPY . .
# HF Spaces expects port 7860
EXPOSE 7860
# Start server
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]