Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -17
Dockerfile
CHANGED
|
@@ -2,26 +2,15 @@ FROM python:3.10.7
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install
|
| 6 |
RUN apt-get update && \
|
| 7 |
-
apt-get install -y
|
| 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
|
| 23 |
|
| 24 |
-
COPY
|
| 25 |
|
| 26 |
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
| 27 |
|
|
@@ -30,6 +19,4 @@ COPY. /app
|
|
| 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"]
|
|
|
|
| 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 |
|
| 15 |
RUN pip install --no-cache-dir --upgrade -r /app/requirements.txt
|
| 16 |
|
|
|
|
| 19 |
# Change permissions for the app directory
|
| 20 |
RUN chmod -R 777 /app
|
| 21 |
|
|
|
|
|
|
|
| 22 |
CMD ["chainlit", "run", "app.py", "--port", "7860"]
|