rajkhanke's picture
Upload 14 files
292c00b verified
raw
history blame contribute delete
819 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 requirements file into the container at /code
COPY requirements.txt /code/
# Install any needed packages specified in requirements.txt
RUN pip install --no-cache-dir --upgrade -r requirements.txt
# Copy the current directory contents into the container at /code
COPY . /code
# Grant write permissions to the data directory for any dynamic file generation
# (e.g. forecasting data generation)
RUN chmod -R 777 /code/data
# Make port 7860 available to the world outside this container
EXPOSE 7860
# Define environment variable
ENV PORT=7860
# Run gunicorn when the container launches
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app_flask:app"]