FROM python:3.9-slim # The following line is required for the Dev Mode to be functional on Hugging Face Spaces RUN useradd -m -u 1000 user # Install Flask RUN pip install --no-cache-dir flask # Set up the working directory WORKDIR /app # Copy our application files COPY hello_world_app.py /app/ # Switch to the "user" user (required for Hugging Face Spaces) USER user # Set home to the user's home directory ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH # Expose the port the app runs on EXPOSE 7860 # Run the application CMD ["python", "hello_world_app.py"]