Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -2,11 +2,12 @@
|
|
| 2 |
# Base ships R + sf/GDAL/GEOS/PROJ (the slowest deps to build).
|
| 3 |
FROM rocker/geospatial:4.4
|
| 4 |
|
| 5 |
-
# DuckDB lives on the edgarodriguez/depth_alpha dataset; baked in at
|
| 6 |
-
# Override with: docker build --build-arg DDB_URL=... -t depth-hf .
|
|
|
|
|
|
|
|
|
|
| 7 |
ARG DDB_URL=https://huggingface.co/datasets/edgarodriguez/depth_alpha/resolve/main/depth_mexico.duckdb
|
| 8 |
-
# For a PRIVATE dataset, also pass --build-arg HF_TOKEN=hf_xxx
|
| 9 |
-
ARG HF_TOKEN=
|
| 10 |
|
| 11 |
RUN install2.r --error --skipinstalled \
|
| 12 |
shiny bslib DBI duckdb dplyr jsonlite htmltools glue writexl ggplot2 stringr \
|
|
@@ -17,8 +18,7 @@ WORKDIR /app
|
|
| 17 |
COPY 10.11_draw_query_indicators_v10_HF.R helpers.R 10.08_styles.css ./
|
| 18 |
|
| 19 |
# Bake the DuckDB into the image (build-time download).
|
| 20 |
-
RUN
|
| 21 |
-
&& curl -fL ${AUTH:+-H "$AUTH"} "${DDB_URL}" -o /app/depth_mexico.duckdb \
|
| 22 |
&& test -s /app/depth_mexico.duckdb \
|
| 23 |
&& ls -lh /app/depth_mexico.duckdb
|
| 24 |
|
|
@@ -30,3 +30,4 @@ ENV DEPTH_DDB_PATH=/app/depth_mexico.duckdb \
|
|
| 30 |
|
| 31 |
EXPOSE 7860
|
| 32 |
CMD ["Rscript", "10.11_draw_query_indicators_v10_HF.R"]
|
|
|
|
|
|
| 2 |
# Base ships R + sf/GDAL/GEOS/PROJ (the slowest deps to build).
|
| 3 |
FROM rocker/geospatial:4.4
|
| 4 |
|
| 5 |
+
# DuckDB lives on the edgarodriguez/depth_alpha dataset (public); baked in at
|
| 6 |
+
# build. Override with: docker build --build-arg DDB_URL=... -t depth-hf .
|
| 7 |
+
# If the dataset is ever made PRIVATE, add a build secret instead of an ARG:
|
| 8 |
+
# RUN --mount=type=secret,id=hf_token curl -H "Authorization: Bearer \
|
| 9 |
+
# $(cat /run/secrets/hf_token)" -fL "${DDB_URL}" -o /app/depth_mexico.duckdb
|
| 10 |
ARG DDB_URL=https://huggingface.co/datasets/edgarodriguez/depth_alpha/resolve/main/depth_mexico.duckdb
|
|
|
|
|
|
|
| 11 |
|
| 12 |
RUN install2.r --error --skipinstalled \
|
| 13 |
shiny bslib DBI duckdb dplyr jsonlite htmltools glue writexl ggplot2 stringr \
|
|
|
|
| 18 |
COPY 10.11_draw_query_indicators_v10_HF.R helpers.R 10.08_styles.css ./
|
| 19 |
|
| 20 |
# Bake the DuckDB into the image (build-time download).
|
| 21 |
+
RUN curl -fL "${DDB_URL}" -o /app/depth_mexico.duckdb \
|
|
|
|
| 22 |
&& test -s /app/depth_mexico.duckdb \
|
| 23 |
&& ls -lh /app/depth_mexico.duckdb
|
| 24 |
|
|
|
|
| 30 |
|
| 31 |
EXPOSE 7860
|
| 32 |
CMD ["Rscript", "10.11_draw_query_indicators_v10_HF.R"]
|
| 33 |
+
|