Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +13 -8
Dockerfile
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
FROM rocker/r2u:latest
|
|
|
|
| 2 |
WORKDIR /code
|
| 3 |
|
| 4 |
# Install system dependencies + Python
|
|
@@ -14,7 +15,16 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
| 14 |
# Install huggingface_hub Python package
|
| 15 |
RUN pip3 install huggingface_hub --break-system-packages
|
| 16 |
|
| 17 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
RUN install2.r --error --skipinstalled \
|
| 19 |
shiny \
|
| 20 |
shinydashboard \
|
|
@@ -28,17 +38,12 @@ RUN install2.r --error --skipinstalled \
|
|
| 28 |
progressr \
|
| 29 |
RCurl \
|
| 30 |
curl \
|
| 31 |
-
recipes \
|
| 32 |
-
arrow \
|
| 33 |
base64enc \
|
| 34 |
-
reticulate
|
| 35 |
-
xgboost
|
| 36 |
|
| 37 |
-
# Copy app files
|
| 38 |
COPY . .
|
| 39 |
|
| 40 |
-
# Expose port
|
| 41 |
EXPOSE 7860
|
| 42 |
|
| 43 |
-
# Run the app
|
| 44 |
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
|
|
|
|
| 1 |
FROM rocker/r2u:latest
|
| 2 |
+
|
| 3 |
WORKDIR /code
|
| 4 |
|
| 5 |
# Install system dependencies + Python
|
|
|
|
| 15 |
# Install huggingface_hub Python package
|
| 16 |
RUN pip3 install huggingface_hub --break-system-packages
|
| 17 |
|
| 18 |
+
# Tell reticulate which Python to use
|
| 19 |
+
ENV RETICULATE_PYTHON=/usr/bin/python3
|
| 20 |
+
|
| 21 |
+
# Heavy R packages (cached separately so they don't rebuild often)
|
| 22 |
+
RUN install2.r --error --skipinstalled \
|
| 23 |
+
arrow \
|
| 24 |
+
xgboost \
|
| 25 |
+
recipes
|
| 26 |
+
|
| 27 |
+
# Lighter R packages (this layer rebuilds if you add/remove packages)
|
| 28 |
RUN install2.r --error --skipinstalled \
|
| 29 |
shiny \
|
| 30 |
shinydashboard \
|
|
|
|
| 38 |
progressr \
|
| 39 |
RCurl \
|
| 40 |
curl \
|
|
|
|
|
|
|
| 41 |
base64enc \
|
| 42 |
+
reticulate
|
|
|
|
| 43 |
|
| 44 |
+
# Copy app files (changes here won't trigger package reinstall)
|
| 45 |
COPY . .
|
| 46 |
|
|
|
|
| 47 |
EXPOSE 7860
|
| 48 |
|
|
|
|
| 49 |
CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
|