-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (40 loc) · 1.43 KB
/
Dockerfile
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# Use the official Python image from Docker Hub
FROM python:3.10.10-slim
# Set the working directory
WORKDIR /app
# Install necessary system dependencies and build tools
RUN apt-get update && apt-get install -y \
build-essential \
wget \
libpoppler-cpp-dev \
libsqlite3-dev \
&& rm -rf /var/lib/apt/lists/*
# Download and install the latest SQLite version
RUN SQLITE_VERSION=$(wget -qO- https://www.sqlite.org/download.html | grep -oP 'sqlite-autoconf-\d{7}\.tar\.gz' | head -1 | grep -oP '\d{7}') \
&& wget https://www.sqlite.org/2024/sqlite-autoconf-$SQLITE_VERSION.tar.gz \
&& tar xvfz sqlite-autoconf-$SQLITE_VERSION.tar.gz \
&& cd sqlite-autoconf-$SQLITE_VERSION \
&& ./configure \
&& make \
&& make install \
&& cd .. \
&& rm -rf sqlite-autoconf-$SQLITE_VERSION* \
&& ldconfig
# Verify SQLite version
RUN sqlite3 --version
# Copy the application code
COPY . /app/
# Install Python dependencies
RUN pip install chromadb==0.5.3
RUN pip install streamlit==1.36.0
RUN pip install langchain_core==0.2.9
RUN pip install langchain_community==0.2.5
RUN pip install PyPDF2
RUN pip install pypdf==4.2.0
# Expose the ports
EXPOSE 8501
# Set environment variables
# ENV BASE_URL=http://ollama:11434
ENV BASE_URL=http://host.docker.internal:11434
# Run the application
CMD ["streamlit", "run", "chatbot.py", "--server.port=8501", "--server.address=0.0.0.0"]