Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -53
Dockerfile
CHANGED
|
@@ -1,55 +1,12 @@
|
|
| 1 |
-
FROM rocker/r2u:24.04
|
| 2 |
|
| 3 |
-
|
| 4 |
-
RUN
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
# ---- R packages (r2u serves these as apt binaries) ----
|
| 12 |
-
# tidymodels brings recipes/dplyr/tidyr/workflows/parsnip, so those aren't listed separately.
|
| 13 |
-
# kknn is the engine behind the xwOBA model - needed at predict time even though it's never library()'d.
|
| 14 |
-
RUN install2.r --error --skipinstalled \
|
| 15 |
-
shiny \
|
| 16 |
-
arrow \
|
| 17 |
-
httr \
|
| 18 |
-
jsonlite \
|
| 19 |
-
readr \
|
| 20 |
-
DT \
|
| 21 |
-
reticulate \
|
| 22 |
-
xgboost \
|
| 23 |
-
stringr \
|
| 24 |
-
bundle \
|
| 25 |
-
tidymodels \
|
| 26 |
-
kknn \
|
| 27 |
-
base64enc \
|
| 28 |
-
bslib \
|
| 29 |
-
glue \
|
| 30 |
-
patchwork \
|
| 31 |
-
gt \
|
| 32 |
-
gtExtras \
|
| 33 |
-
purrr \
|
| 34 |
-
scales \
|
| 35 |
-
knitr \
|
| 36 |
-
htmltools
|
| 37 |
-
|
| 38 |
-
# ---- Point reticulate at the system Python where huggingface_hub lives ----
|
| 39 |
-
ENV RETICULATE_PYTHON=/usr/bin/python3
|
| 40 |
-
# ---- Writable cache/home (HF Spaces filesystem is read-only except /tmp) ----
|
| 41 |
-
ENV HOME=/tmp
|
| 42 |
-
ENV HF_HOME=/tmp/hf
|
| 43 |
-
|
| 44 |
-
# ---- App files (flat structure, all in /app) ----
|
| 45 |
-
# Models + run values are downloaded from CleanDataObjects at startup, so they are NOT copied here.
|
| 46 |
-
WORKDIR /app
|
| 47 |
-
COPY app.R /app/app.R
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
COPY HHLogo.png /app/HHLogo.png
|
| 51 |
-
|
| 52 |
-
# ---- HF Spaces expects the app on port 7860 ----
|
| 53 |
EXPOSE 7860
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
| 1 |
|
| 2 |
+
FROM rocker/r2u:latest
|
| 3 |
+
RUN install2.r --error \
|
| 4 |
+
shiny bslib glue \
|
| 5 |
+
httr arrow dplyr tidyr stringr \
|
| 6 |
+
ggplot2 plotly scales \
|
| 7 |
+
gt gtExtras magick \
|
| 8 |
+
base64enc
|
| 9 |
+
COPY . /app/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
EXPOSE 7860
|
| 11 |
+
CMD ["R", "-e", "shiny::runApp('/app', host='0.0.0.0', port=7860)"]
|
| 12 |
+
|