File size: 545 Bytes
14f2bff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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.9

WORKDIR /code

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

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

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

RUN pip install -U langchain-community

# 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", "responses:app"]