Spaces:
Sleeping
Sleeping
Download Dockerfile from riki74/equil2-api: direct link, hf CLI and curl.
- Browser
- Download file 1.13 kB
-
https://huggingface.co/spaces/riki74/equil2-api/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/riki74/equil2-api/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/riki74/equil2-api/resolve/main/Dockerfile
1.13 kB
| FROM rocker/r-ver:4.3.2 | |
| # Install system dependencies (più completo) | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| libcurl4-openssl-dev \ | |
| libssl-dev \ | |
| libxml2-dev \ | |
| libsodium-dev \ | |
| libudunits2-dev \ | |
| libgdal-dev \ | |
| libgeos-dev \ | |
| libproj-dev \ | |
| ca-certificates \ | |
| tzdata \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Install R packages step by step per troubleshooting | |
| RUN R -e "install.packages('sodium', repos='https://cloud.r-project.org')" | |
| RUN R -e "install.packages('units', repos='https://cloud.r-project.org')" | |
| RUN R -e "install.packages('httpuv', repos='https://cloud.r-project.org')" | |
| RUN R -e "install.packages(c('jsonlite','readr','dplyr','tidyr','purrr'), repos='https://cloud.r-project.org')" | |
| RUN R -e "install.packages('plumber', repos='https://cloud.r-project.org')" | |
| RUN R -e "install.packages('equil2', repos='https://cloud.r-project.org')" | |
| RUN R -e "install.packages('tibble', repos='https://cloud.r-project.org')" | |
| WORKDIR /app | |
| COPY . . | |
| EXPOSE 7860 | |
| CMD ["R", "-e", "pr <- plumber::plumb('plumber.R'); pr$run(host='0.0.0.0', port=7860)"] |