Spaces:
Runtime error
Runtime error
File size: 846 Bytes
e68d535 7495ea1 d1f2bb1 e68d535 1182f17 e68d535 |
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 30 31 32 33 34 35 36 |
# Use Python 3.12 base image and install uv
FROM python:3.12-slim
# Install uv
RUN pip install uv
# Set environment variables
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
UV_COMPILE_BYTECODE=1 \
UV_LINK_MODE=copy \
PYTHONPATH=/app \
UV_CACHE_DIR=/tmp/.cache
# Set working directory
WORKDIR /app
# Copy pyproject.toml and uv.lock first for better layer caching
COPY pyproject.toml uv.lock ./
# Install dependencies using uv
RUN uv sync --frozen --no-cache
# Copy the application code
COPY backend/ ./backend/
COPY fin-data/ ./fin-data/
COPY fin-data/processed/vector_db/* /tmp/
# Create static directory if it doesn't exist
RUN mkdir -p backend/api/static
# Expose the port
EXPOSE 8000
# Command to run the application
CMD ["uv", "run", "uvicorn", "backend.api.main:app", "--host", "0.0.0.0", "--port", "8000"] |