File size: 703 Bytes
f48a9aa
2636575
1051b46
 
2636575
f48a9aa
2636575
1051b46
f48a9aa
2636575
849b2fa
 
f48a9aa
 
2636575
4df7c12
849b2fa
f48a9aa
 
 
 
4df7c12
f48a9aa
 
 
 
12a9bf1
2dbc823
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
FROM python:3.11 as build

# Set the working directory to /app
WORKDIR /app

ENV PYTHONPATH=/app

# Install any needed packages specified in requirements.txt
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip pip install poetry

RUN poetry config virtualenvs.create false

COPY ./pyproject.toml ./poetry.lock* /app/
RUN poetry install

# Download the 'stopwords' resource before running the app
RUN python -c "import nltk; nltk.download('stopwords')"
# RUN chmod -R 775 /usr/local/lib/python3.11/site-packages/llama_index

# ====================================
FROM build as release

COPY . .

# Make port 8000 available to the world outside this container
EXPOSE 8000

CMD ["python", "main.py"]