FROM python:3.9-slim # WORKDIR /app # COPY requirements.txt . # RUN pip install --no-cache-dir -r requirements.txt # COPY . . # EXPOSE 8080 # CMD ["python", "app.py"] FROM python:3.9-slim # Set the working directory inside the container WORKDIR /app # Install dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application code COPY . . # Expose the port your React app runs on EXPOSE 7860 # Add ownership to the user RUN chown -R 1001:1001 /app # Change to the created user USER 1001 # Command to run the application CMD ["python", "app.py"]