File size: 616 Bytes
936d144 6e8e0c5 936d144 f15c03c 936d144 f15c03c 936d144 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | # Use an official Python runtime as a parent image
FROM python:3.11-slim
# Set environment variables to ensure logs are printed immediately
ENV PYTHONUNBUFFERED=1
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt .
# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the app files into the container
COPY app.py .
COPY NEW_AI_INFRA.html .
# Expose the port Flask runs on
EXPOSE 7860
# Run the application
# Note: We set host to 0.0.0.0 so it's accessible outside the container
CMD ["python", "app.py"]
|