Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files12345678910111213141516171819202122232425262728293031# Use an official Python runtime as a parent imageFROM python:3.9
# Create a non-root user with a home directoryRUN useradd -m -u 1000 user
# Set the user to the non-root userUSER user
# Add the user's local bin to the PATHENV PATH="/home/user/.local/bin:$PATH"
# Set the working directory to /appWORKDIR /app
# Copy the requirements.txt file and install any dependenciesCOPY --chown=user ./requirements.txt /app/requirements.txtRUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
# Copy the current directory contents into the container at /appCOPY --chown=user . /app
# Create the folders for uploads and results with appropriate permissionsRUN mkdir -p /app/static/uploads /app/static/results && \ chmod -R 755 /app/static/uploads /app/static/results
# Expose the port the app will run onEXPOSE 7860
# Run the Flask app using uvicornCMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]DockerfileAdded+31