File size: 486 Bytes
45c9afd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM python:3.9

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt

# Set cache directory permissions to prevent HF errors
RUN mkdir -p /code/cache && chmod 777 /code/cache
ENV HF_HOME=/code/cache

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt

COPY . .

# Ensure submissions directory exists and is writable
RUN mkdir -p /code/submissions && chmod 777 /code/submissions

# Expose port 7860
EXPOSE 7860

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