Spaces:
Sleeping
Sleeping
File size: 608 Bytes
cef9b26 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | # DeFi Agents Backend - Docker with uv
FROM python:3.11-slim
WORKDIR /app
# Install uv (fast Python package manager)
ENV UV_SYSTEM=1
ENV UV_COMPILE_BYTECODE=1
# Hugging Face uses port 7860
ENV PORT=7860
RUN pip install --no-cache-dir uv
# Copy only requirements first (for better caching)
COPY pyproject.toml uv.lock* ./
# Install dependencies
RUN uv pip install --system -r pyproject.toml
# Copy application code
COPY . .
# Expose Hugging Face port
EXPOSE 7860
# Run the FastAPI server with uvicorn
CMD ["uv", "run", "python", "-m", "uvicorn", "web.app:app", "--host", "0.0.0.0", "--port", "7860"]
|