File size: 836 Bytes
2f203f5
 
0264bea
2f203f5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
37
38
39
FROM python:3.11-slim

# Install system dependencies
RUN apt-get update && apt-get install -y \
    curl \
    git \
    && rm -rf /var/lib/apt/lists/*

# Install uv for fast package management
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/

# Set working directory
WORKDIR /app

# Copy dependency configs
COPY pyproject.toml uv.lock ./

# Install python dependencies (exclude the project itself to cache dependencies)
RUN uv sync --frozen --no-dev --no-install-project

# Copy project source code
COPY . .

# Install the project itself
RUN uv sync --frozen --no-dev

# Ensure entrypoint is executable
RUN chmod +x /app/entrypoint.sh

# Expose the default Hugging Face Space port
EXPOSE 7860

# Environment variables
ENV PYTHONUNBUFFERED=1 \
    PREFAB_BUNDLED_RENDERER=1

# Run the entrypoint script
CMD ["/app/entrypoint.sh"]