cloudvarslol / Dockerfile
MemeTech's picture
Update Dockerfile
0d477f2
raw
history blame contribute delete
598 Bytes
# Use Python 3.9 as the base image
FROM python:3.9
# Set the working directory to /code
WORKDIR /code
# Copy the requirements.txt file to the container
COPY ./requirements.txt /code/requirements.txt
# Install Python dependencies from requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
# Copy the rest of the files from the current directory to the container
COPY . .
# Expose port 7860
EXPOSE 7860
# Set up Flask-specific configurations
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV FLASK_RUN_PORT=7860
# Run the Flask application
CMD ["flask", "run"]