arshy commited on
Commit
475d2b0
1 Parent(s): df069ee
Files changed (1) hide show
  1. Dockerfile +12 -7
Dockerfile CHANGED
@@ -13,26 +13,31 @@ RUN apt-get update && \
13
  apt-get clean && \
14
  rm -rf /var/lib/apt/lists/*
15
 
16
- # Download and compile sqlite3 from source
17
- RUN wget https://www.sqlite.org/2021/sqlite-autoconf-3350500.tar.gz && \
18
- tar xvfz sqlite-autoconf-3350500.tar.gz && \
19
- cd sqlite-autoconf-3350500 && \
20
  ./configure --prefix=/usr --disable-static CFLAGS="-DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_FTS3_TOKENIZER=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1" && \
21
  make && \
22
  make install && \
23
  cd .. && \
24
- rm sqlite-autoconf-3350500.tar.gz && \
25
- rm -rf sqlite-autoconf-3350500
26
 
27
- # Verify sqlite3 version
28
  RUN sqlite3 --version
29
 
30
  # Install Python dependencies
31
  RUN pip install poetry gradio
32
 
 
 
 
33
  # Create a non-root user and change ownership of the /app directory
34
  RUN adduser --disabled-password --gecos '' myuser && \
35
  chown -R myuser:myuser /app
 
 
36
  USER myuser
37
 
38
  # Expose the port Gradio runs on
 
13
  apt-get clean && \
14
  rm -rf /var/lib/apt/lists/*
15
 
16
+ # Upgrade to a more recent SQLite version
17
+ RUN wget https://www.sqlite.org/2021/sqlite-autoconf-3360000.tar.gz && \
18
+ tar xvfz sqlite-autoconf-3360000.tar.gz && \
19
+ cd sqlite-autoconf-3360000 && \
20
  ./configure --prefix=/usr --disable-static CFLAGS="-DSQLITE_ENABLE_FTS3=1 -DSQLITE_ENABLE_COLUMN_METADATA=1 -DSQLITE_ENABLE_UNLOCK_NOTIFY=1 -DSQLITE_SECURE_DELETE=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_FTS3_TOKENIZER=1 -DSQLITE_ENABLE_FTS4=1 -DSQLITE_ENABLE_FTS5=1 -DSQLITE_ENABLE_JSON1=1 -DSQLITE_ENABLE_RTREE=1" && \
21
  make && \
22
  make install && \
23
  cd .. && \
24
+ rm sqlite-autoconf-3360000.tar.gz && \
25
+ rm -rf sqlite-autoconf-3360000
26
 
27
+ # Verify sqlite3 version system-wide
28
  RUN sqlite3 --version
29
 
30
  # Install Python dependencies
31
  RUN pip install poetry gradio
32
 
33
+ # After installing dependencies, check SQLite version in Python
34
+ RUN python -c "import sqlite3; print('Python SQLite version:', sqlite3.sqlite_version)"
35
+
36
  # Create a non-root user and change ownership of the /app directory
37
  RUN adduser --disabled-password --gecos '' myuser && \
38
  chown -R myuser:myuser /app
39
+
40
+ # Switch to the non-root user
41
  USER myuser
42
 
43
  # Expose the port Gradio runs on