Spaces:
Runtime error
Runtime error
File size: 585 Bytes
28ba083 dcccfd9 28ba083 50d1e24 28ba083 dcccfd9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# Use Python 3.9 as the base image
FROM python:3.9-slim
# Set environment variables to avoid writing .pyc files
ENV PYTHONUNBUFFERED 1
# Set the working directory in the container
WORKDIR /app
# Copy the requirements.txt file into the container
COPY requirements.txt /app/
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Install gunicorn
RUN pip install gunicorn
# Copy the Python client script into the container
COPY app.py /app/
# Set the command to run the Python client with gunicorn
CMD ["gunicorn", "-w", "4", "-b", "0.0.0.0:8000", "app:app"]
|