softwareDevelopment commited on
Commit
1f8c4f1
·
verified ·
1 Parent(s): 1214723

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -19
Dockerfile CHANGED
@@ -1,40 +1,28 @@
1
- # Simplified Dockerfile for Hugging Face without data directory
2
  FROM rocker/shiny:4.3.1
3
 
4
- # Install system dependencies
5
  RUN apt-get update && apt-get install -y \
6
  libcurl4-openssl-dev \
7
  libssl-dev \
8
  libxml2-dev \
9
  libcairo2-dev \
10
  libxt-dev \
11
- libmagick++-dev \
12
  curl \
13
  && apt-get clean \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
- # Install R packages (minimal set for Hugging Face)
17
- RUN R -e "install.packages(c('shiny', 'shinydashboard', 'DT', 'ggplot2', 'plotly', 'dplyr', 'tidyr', 'RColorBrewer', 'car', 'lme4', 'mgcv', 'randomForest', 'e1071', 'qtl'), repos='https://cloud.r-project.org/')"
18
 
19
  # Create app directory
20
  RUN mkdir -p /home/shiny/app
21
 
22
- # Copy only the app.R file
23
  COPY app.R /home/shiny/app/
24
 
25
- # Configure Shiny Server
26
- RUN echo '\
27
- run_as shiny;\n\
28
- server {\n\
29
- listen 7860;\n\
30
- location / {\n\
31
- app_dir /home/shiny/app;\n\
32
- app_init_timeout 120;\n\
33
- app_idle_timeout 600;\n\
34
- max_request_size 50M;\n\
35
- }\n\
36
- }\n\
37
- ' > /etc/shiny-server/shiny-server.conf
38
 
39
  # Set permissions
40
  RUN chown -R shiny:shiny /home/shiny
 
1
+ # Minimal Dockerfile for Hugging Face
2
  FROM rocker/shiny:4.3.1
3
 
4
+ # Install minimal system dependencies
5
  RUN apt-get update && apt-get install -y \
6
  libcurl4-openssl-dev \
7
  libssl-dev \
8
  libxml2-dev \
9
  libcairo2-dev \
10
  libxt-dev \
 
11
  curl \
12
  && apt-get clean \
13
  && rm -rf /var/lib/apt/lists/*
14
 
15
+ # Install essential R packages
16
+ RUN R -e "install.packages(c('shiny', 'shinydashboard', 'DT', 'ggplot2', 'plotly', 'dplyr', 'tidyr', 'RColorBrewer', 'car', 'randomForest', 'qtl'), repos='https://cloud.r-project.org/')"
17
 
18
  # Create app directory
19
  RUN mkdir -p /home/shiny/app
20
 
21
+ # Copy app
22
  COPY app.R /home/shiny/app/
23
 
24
+ # Use default Shiny Server config (just change port)
25
+ RUN sed -i 's/3838/7860/g' /etc/shiny-server/shiny-server.conf
 
 
 
 
 
 
 
 
 
 
 
26
 
27
  # Set permissions
28
  RUN chown -R shiny:shiny /home/shiny