| |
| FROM python:3.10-slim |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
|
|
| |
| ENV MAX_JOBS=1 |
|
|
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| git \ |
| libgl1 \ |
| libglib2.0-0 \ |
| build-essential \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN pip install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cpu |
|
|
| |
| RUN git clone https://github.com/VAST-AI-Research/TripoSR.git /app/TripoSR |
|
|
| |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN pip install --no-cache-dir -r /app/TripoSR/requirements.txt |
|
|
| |
| COPY app.py . |
|
|
| |
| RUN mkdir -p /app/outputs |
|
|
| EXPOSE 7860 |
|
|
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |