Spaces:
Paused
Paused
| FROM nvidia/cuda:12.1.1-cudnn8-runtime-ubuntu22.04 | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y \ | |
| python3.10 \ | |
| python3.10-distutils \ | |
| python3.10-venv \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN curl https://bootstrap.pypa.io/get-pip.py | python3.10 | |
| # Force python + pip to use 3.10 | |
| RUN ln -sf /usr/bin/python3.10 /usr/bin/python | |
| RUN ln -sf /usr/local/bin/pip /usr/bin/pip | |
| # Verify version (important) | |
| RUN python --version | |
| COPY requirements.txt . | |
| # RUN pip install --upgrade pip | |
| RUN pip install -r requirements.txt | |
| COPY . . | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] | |
| # CMD ["python", "model_loader.py"] | |
| # CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port $PORT"] | |