cpflecht commited on
Commit
035c8b4
·
verified ·
1 Parent(s): 61b491f

Create dockerfile

Browse files
Files changed (1) hide show
  1. dockerfile +32 -0
dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM rocker/shiny:latest
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ libcurl4-openssl-dev \
6
+ libssl-dev \
7
+ libxml2-dev \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ # Install R packages
11
+ RUN R -e "install.packages(c('shiny','shinythemes','DT','dplyr','tidyr','readr','plotly','stringr','scales'), repos='https://cran.rstudio.com/')"
12
+
13
+ # Copy app files into the Shiny Server app directory
14
+ COPY app.R /srv/shiny-server/app/app.R
15
+ COPY OA_sheet_for_app.csv /srv/shiny-server/app/OA_sheet_for_app.csv
16
+ COPY all_players_enriched_multiseason.csv /srv/shiny-server/app/all_players_enriched_multiseason.csv
17
+
18
+ # Expose the port Hugging Face expects
19
+ EXPOSE 7860
20
+
21
+ # Configure Shiny Server to run on port 7860
22
+ RUN echo 'run_as shiny;\n\
23
+ server {\n\
24
+ listen 7860;\n\
25
+ location / {\n\
26
+ site_dir /srv/shiny-server/app;\n\
27
+ log_dir /var/log/shiny-server;\n\
28
+ directory_index on;\n\
29
+ }\n\
30
+ }' > /etc/shiny-server/shiny-server.conf
31
+
32
+ CMD ["/usr/bin/shiny-server"]