Spaces:
Sleeping
Sleeping
File size: 665 Bytes
b313f94 580b13a b313f94 58531a1 b313f94 58531a1 | 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 | FROM python:3.11-slim
# Install uv
COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv
# Set up the application directory
WORKDIR /app
# Copy your dependency files from the subdirectory to the container
# Adjust 'pyproject.toml' or 'uv.lock' to match your actual file names
COPY pyproject.toml uv.lock* /app/
# Install dependencies into the system python
RUN uv sync
# Copy the rest of your code
COPY . /app/
RUN useradd -m -u 1000 user
USER user
ENV PATH="/app/.venv/bin:$PATH"
COPY --chown=user . /app
EXPOSE 7860
ENV GRADIO_SERVER_NAME="0.0.0.0"
# Run the application
# Note: We point to server.app because we are inside /app/
CMD ["uv", "run", "main.py"]
|