faizee07's picture
Upload 4 files
e923fbd verified
raw
history blame
687 Bytes
# Use an official Python runtime as a parent image
FROM python:3.9-slim
# Set the working directory in the container
WORKDIR /code
# Copy the dependencies file to the working directory
COPY requirements.txt .
# Install any needed packages specified in requirements.txt
# We also need git to be installed in the container
RUN apt-get update && apt-get install -y git && \
pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application code to the working directory
COPY . .
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Define environment variable
ENV PORT=7860
# Run app.py when the container launches
CMD ["python", "app.py"]