SQL_agent / Dockerfile
WebashalarForML's picture
Update Dockerfile
9664235 verified
raw
history blame
733 Bytes
# Use an official Python runtime as a parent image
FROM python:3.11-slim
# Install any system dependencies (for example, gcc may be needed for some Python packages)
RUN apt-get update && apt-get install -y gcc
# Set the working directory to /app
WORKDIR /app
# Copy the requirements file into the container at /app
COPY requirements.txt .
# Upgrade pip and install any needed packages specified in requirements.txt
RUN pip install --upgrade pip && pip install -r requirements.txt
# Copy the rest of the application code into the container
COPY . .
# Run the application
COPY . /app/
ENV FLASK_APP=app.py \
FLASK_ENV=production
EXPOSE 7860
CMD ["gunicorn", "-w", "1", "-b", "0.0.0.0:7860", "--timeout", "120", "app:app"]