File size: 510 Bytes
d7e5b1d
 
 
 
 
 
 
0abf406
d7e5b1d
 
8b3695f
 
 
 
 
5580d59
d7e5b1d
 
 
 
8b3695f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.10-slim

WORKDIR /code

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy all code, including templates and static folders
COPY . .

# Create uploads directory and set permissions for both uploads and prediction history
RUN mkdir -p /code/uploads && \
    touch /code/prediction_history.json && \
    chmod 777 /code/uploads && \
    chmod 777 /code/prediction_history.json

EXPOSE 7860

ENV FLASK_APP=app.py

CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]