Peter Mutwiri commited on
Commit ·
6352c84
1
Parent(s): 4cecdc0
updated dockerfilel with the latest duck db install
Browse files- Dockerfile +11 -7
Dockerfile
CHANGED
|
@@ -14,23 +14,27 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 14 |
unzip \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
| 17 |
-
|
| 18 |
# ---- 3. upgrade pip & enable pre-built wheels ------------------------------
|
| 19 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 20 |
|
| 21 |
# ---- 4. install Python deps (+ DuckDB driver) ------------------------------
|
| 22 |
COPY requirements.txt /tmp/requirements.txt
|
| 23 |
RUN pip install --no-cache-dir --prefer-binary -r /tmp/requirements.txt && \
|
| 24 |
-
pip install --no-cache-dir duckdb==0.10.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
# ----
|
| 27 |
COPY . /app
|
| 28 |
WORKDIR /app
|
| 29 |
|
| 30 |
-
# ----
|
| 31 |
COPY scheduler_loop.py /app/scheduler_loop.py
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
# ---- 7. start both services -----------------------------------------------
|
| 36 |
CMD sh -c "python -m uvicorn app.main:app --host 0.0.0.0 --port 7860 & python /app/scheduler_loop.py"
|
|
|
|
| 14 |
unzip \
|
| 15 |
&& rm -rf /var/lib/apt/lists/*
|
| 16 |
|
|
|
|
| 17 |
# ---- 3. upgrade pip & enable pre-built wheels ------------------------------
|
| 18 |
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
| 19 |
|
| 20 |
# ---- 4. install Python deps (+ DuckDB driver) ------------------------------
|
| 21 |
COPY requirements.txt /tmp/requirements.txt
|
| 22 |
RUN pip install --no-cache-dir --prefer-binary -r /tmp/requirements.txt && \
|
| 23 |
+
pip install --no-cache-dir duckdb==0.10.3
|
| 24 |
+
|
| 25 |
+
# ---- 5. Pre-download VSS extension (matches DuckDB v0.10.3) ---------------
|
| 26 |
+
# This prevents runtime download failures and startup crashes
|
| 27 |
+
RUN mkdir -p /root/.duckdb/extensions/v0.10.3/linux_amd64_gcc4 && \
|
| 28 |
+
wget -q https://extensions.duckdb.org/v0.10.3/linux_amd64_gcc4/vss.duckdb_extension.gz \
|
| 29 |
+
-O /root/.duckdb/extensions/v0.10.3/linux_amd64_gcc4/vss.duckdb_extension.gz && \
|
| 30 |
+
gunzip /root/.duckdb/extensions/v0.10.3/linux_amd64_gcc4/vss.duckdb_extension.gz
|
| 31 |
|
| 32 |
+
# ---- 6. copy source --------------------------------------------------------
|
| 33 |
COPY . /app
|
| 34 |
WORKDIR /app
|
| 35 |
|
| 36 |
+
# ---- 7. scheduler loop ----------------------------------------------------
|
| 37 |
COPY scheduler_loop.py /app/scheduler_loop.py
|
| 38 |
|
| 39 |
+
# ---- 8. start both services -----------------------------------------------
|
|
|
|
|
|
|
| 40 |
CMD sh -c "python -m uvicorn app.main:app --host 0.0.0.0 --port 7860 & python /app/scheduler_loop.py"
|