Spaces:
Running
Running
Simplified: download pre-built binary from GitHub Releases (no Rust build in image)
Browse files- Dockerfile +14 -18
Dockerfile
CHANGED
|
@@ -1,24 +1,20 @@
|
|
| 1 |
-
#
|
| 2 |
-
|
|
|
|
| 3 |
|
| 4 |
-
RUN apt-get update && apt-get install -y \
|
| 5 |
-
git pkg-config libssl-dev ca-certificates \
|
| 6 |
-
libopenblas-dev \
|
| 7 |
-
&& rm -rf /var/lib/apt/lists/*
|
| 8 |
-
|
| 9 |
-
# Clone the fork and build only the CLI crate
|
| 10 |
-
RUN git clone --depth 1 https://github.com/cronos3k/larql /build
|
| 11 |
-
WORKDIR /build
|
| 12 |
-
RUN cargo build --release -p larql-cli
|
| 13 |
-
|
| 14 |
-
# Stage 2: Lean runtime image
|
| 15 |
FROM python:3.11-slim-bookworm
|
| 16 |
|
| 17 |
-
#
|
| 18 |
-
RUN apt-get update && apt-get install -y
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
#
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
# Copy the Gradio demo app
|
| 24 |
COPY app.py utils.py requirements.txt /app/
|
|
@@ -34,5 +30,5 @@ EXPOSE 7860
|
|
| 34 |
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 35 |
ENV GRADIO_SERVER_PORT=7860
|
| 36 |
|
| 37 |
-
# app.py downloads the demo vindex from HF
|
| 38 |
CMD ["python", "app.py"]
|
|
|
|
| 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, no compiler toolchain needed.
|
| 4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
FROM python:3.11-slim-bookworm
|
| 6 |
|
| 7 |
+
# Runtime deps only: libopenblas0 for the larql binary, curl for the download
|
| 8 |
+
RUN apt-get update && apt-get install -y \
|
| 9 |
+
libopenblas0 curl ca-certificates \
|
| 10 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 11 |
|
| 12 |
+
# Download the latest pre-built Linux binary from GitHub Releases
|
| 13 |
+
RUN curl -fsSL \
|
| 14 |
+
https://github.com/cronos3k/larql/releases/download/latest-linux/larql-linux-x86_64 \
|
| 15 |
+
-o /usr/local/bin/larql \
|
| 16 |
+
&& chmod +x /usr/local/bin/larql \
|
| 17 |
+
&& larql --version
|
| 18 |
|
| 19 |
# Copy the Gradio demo app
|
| 20 |
COPY app.py utils.py requirements.txt /app/
|
|
|
|
| 30 |
ENV GRADIO_SERVER_NAME=0.0.0.0
|
| 31 |
ENV GRADIO_SERVER_PORT=7860
|
| 32 |
|
| 33 |
+
# app.py downloads the demo vindex from HF dataset on first startup (~480 MB, fast on HF infra)
|
| 34 |
CMD ["python", "app.py"]
|