File size: 475 Bytes
be477d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.11-slim

# Set the working directory to the root
WORKDIR /

# Copy application files to the root
COPY . /

# Install dependencies
RUN pip install --no-cache-dir flask transformers

# Set Hugging Face cache directory
ENV HF_HOME="/tmp/huggingface"

# Create the cache directory and set permissions
RUN mkdir -p /tmp/huggingface && chmod -R 777 /tmp/huggingface

# Expose the port for the app
EXPOSE 7860

# Command to run app.py directly
CMD ["python", "app.py"]