Entreprenerdly commited on
Commit
9477ceb
·
verified ·
1 Parent(s): fd5cd29

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -3
Dockerfile CHANGED
@@ -2,13 +2,24 @@ FROM python:3.10.7
2
 
3
  WORKDIR /app
4
 
5
- # Install pre-built sqlite3
6
  RUN apt-get update && \
7
- apt-get install -y sqlite3 libsqlite3-dev && \
8
  apt-get clean
9
 
 
 
 
 
 
 
 
 
 
 
 
10
  # Verify the sqlite3 version
11
- RUN sqlite3 --version
12
 
13
  COPY./requirements.txt /app/requirements.txt
14
 
@@ -19,4 +30,6 @@ COPY. /app
19
  # Change permissions for the app directory
20
  RUN chmod -R 777 /app
21
 
 
 
22
  CMD ["chainlit", "run", "app.py", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install dependencies for building sqlite3 from source
6
  RUN apt-get update && \
7
+ apt-get install -y wget build-essential libsqlite3-dev && \
8
  apt-get clean
9
 
10
+ # Download and compile sqlite3 from source
11
+ RUN wget https://www.sqlite.org/2023/sqlite-autoconf-3430000.tar.gz && \
12
+ tar xzf sqlite-autoconf-3430000.tar.gz && \
13
+ cd sqlite-autoconf-3430000 && \
14
+ ./configure --prefix=/usr/local/sqlite3 && \
15
+ make && \
16
+ make install && \
17
+ ldconfig && \
18
+ cd.. && \
19
+ rm -rf sqlite-autoconf-3430000 sqlite-autoconf-3430000.tar.gz
20
+
21
  # Verify the sqlite3 version
22
+ RUN /usr/local/sqlite3/bin/sqlite3 --version
23
 
24
  COPY./requirements.txt /app/requirements.txt
25
 
 
30
  # Change permissions for the app directory
31
  RUN chmod -R 777 /app
32
 
33
+ ENV LD_LIBRARY_PATH=/usr/local/sqlite3/lib:$LD_LIBRARY_PATH
34
+
35
  CMD ["chainlit", "run", "app.py", "--port", "7860"]