Spaces:
Runtime error
Runtime error
# Use an official Python runtime as a parent image | |
FROM python:3.11-slim | |
# Set the working directory in the container | |
WORKDIR /app | |
# Copy the requirements file into the container | |
COPY requirements.txt . | |
# Install any needed packages specified in requirements.txt | |
RUN pip install --no-cache-dir -r requirements.txt | |
# Copy the rest of the application's code into the container | |
COPY . . | |
# EXPOSE is good practice but the README's app_port is what HF uses | |
EXPOSE 8080 | |
# Define environment variable to run NiceGUI in non-native mode | |
ENV NICEGUI_NATIVE=false | |
# Use the shell form of CMD for maximum compatibility with the HF platform | |
CMD python main.py |