shipclassification / Dockerfile
AronWolverine's picture
Update Dockerfile
0b27f10 verified
# Use official Python runtime as base image
FROM python:3.9
# Set the working directory in the container
WORKDIR /code
COPY ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir -r requirements.txt
# Copy application files to the container
COPY . .
#Ensure the uploads directory exists and is writable
RUN chmod -R 777 /code/uploads/
# Install required Python packages
# Expose Flask port (default: 5000)
EXPOSE 7860
# Command to run the Flask application
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]