File size: 536 Bytes
4274a31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM python:3.9

WORKDIR /code

# Ensure the directory exists and has broad permissions
RUN mkdir -p /code && chmod -R 777 /code

# Copy the requirements file first to leverage Docker cache
COPY ./requirements.txt /code/requirements.txt

# Install Python dependencies
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

# Copy the rest of the application
COPY . .

# Adjust permissions for everything in /code, to ensure all files are accessible
RUN chmod -R 777 /code

CMD ["gunicorn", "-b", "0.0.0.0:7860", "main:app"]