File size: 745 Bytes
4e1967e
 
 
 
 
 
8f5e4b4
 
 
233810c
 
 
 
4e1967e
 
 
 
 
 
 
 
 
8f5e4b4
f18c709
4e1967e
8f5e4b4
 
233810c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Use the official Python image as the base image
FROM python:3.9

# Set the working directory inside the container
WORKDIR /code

# Set environment variables
ENV TRANSFORMERS_CACHE /code/.cache/huggingface

# Create necessary directories and grant permissions
RUN mkdir -p /code/.cache/huggingface && \
    chmod -R 777 /code/.cache/huggingface

# Copy the requirements file into the container at /code
COPY ./requirements.txt /code/requirements.txt

# Install the required Python packages
RUN pip install --no-cache-dir --upgrade -r requirements.txt

# Copy the entire current directory into the container at /code
COPY . .

# Expose port 7860 to the outside world
EXPOSE 7860

# Command to run the Flask application
CMD ["python", "app.py"]