Spaces:
Running
Running
Final rebuild: ubuntu-22.04 binary (glibc 2.35, Bookworm-compatible)
Browse files- Dockerfile +35 -34
Dockerfile
CHANGED
|
@@ -1,34 +1,35 @@
|
|
| 1 |
-
# LARQL Explorer — HuggingFace Space
|
| 2 |
-
# Downloads the pre-built Linux binary from the cronos3k/larql GitHub Release.
|
| 3 |
-
# No Rust build step: fast image build (~2 min), no compiler toolchain needed.
|
| 4 |
-
# Binary source: https://github.com/cronos3k/larql/releases/tag/latest-linux
|
| 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 |
-
ENV
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
|
|
|
|
|
| 1 |
+
# LARQL Explorer — HuggingFace Space
|
| 2 |
+
# Downloads the pre-built Linux binary from the cronos3k/larql GitHub Release.
|
| 3 |
+
# No Rust build step: fast image build (~2 min), no compiler toolchain needed.
|
| 4 |
+
# Binary source: https://github.com/cronos3k/larql/releases/tag/latest-linux
|
| 5 |
+
# Built on: ubuntu-22.04 (glibc 2.35, compatible with Debian bookworm glibc 2.36)
|
| 6 |
+
|
| 7 |
+
FROM python:3.11-slim-bookworm
|
| 8 |
+
|
| 9 |
+
# Runtime deps only: libopenblas0 for the larql binary, curl for the download
|
| 10 |
+
RUN apt-get update && apt-get install -y \
|
| 11 |
+
libopenblas0 curl ca-certificates \
|
| 12 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 13 |
+
|
| 14 |
+
# Download the latest pre-built Linux binary from GitHub Releases
|
| 15 |
+
RUN curl -fsSL \
|
| 16 |
+
https://github.com/cronos3k/larql/releases/download/latest-linux/larql-linux-x86_64 \
|
| 17 |
+
-o /usr/local/bin/larql \
|
| 18 |
+
&& chmod +x /usr/local/bin/larql
|
| 19 |
+
|
| 20 |
+
# Copy the Gradio demo app
|
| 21 |
+
COPY app.py utils.py requirements.txt /app/
|
| 22 |
+
|
| 23 |
+
WORKDIR /app
|
| 24 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 25 |
+
|
| 26 |
+
# HuggingFace Spaces runs as non-root UID 1000
|
| 27 |
+
RUN useradd -m -u 1000 hfuser && mkdir -p /app/models && chown -R hfuser /app
|
| 28 |
+
USER hfuser
|
| 29 |
+
|
| 30 |
+
EXPOSE 7860
|
| 31 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 32 |
+
ENV GRADIO_SERVER_PORT=7860
|
| 33 |
+
|
| 34 |
+
# app.py downloads the demo vindex from HF dataset on first startup (~480 MB, fast on HF infra)
|
| 35 |
+
CMD ["python", "app.py"]
|