File size: 695 Bytes
938e7dc 9f73c72 938e7dc 9f73c72 938e7dc 9f73c72 938e7dc 9f73c72 938e7dc 9f73c72 938e7dc 9f73c72 938e7dc 9f73c72 938e7dc | 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 | FROM python:3.11-slim
# Create a non-root user (required by Hugging Face Spaces)
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
# Set working directory
WORKDIR /app
# Copy dependency metadata first
COPY --chown=user pyproject.toml ./
# Install build requirements
RUN pip install --no-cache-dir --upgrade pip setuptools wheel build
# Copy the rest of the code
COPY --chown=user . /app
# Install your package and deps
RUN pip install --no-cache-dir .
# Hugging Face Spaces expect apps to listen on port 7860
EXPOSE 7860
# Run Chainlit app (adjust path if needed)
CMD ["chainlit", "run", "src/gamer_x/interface/app.py", "--host", "0.0.0.0", "--port", "7860"]
|