dfalbel commited on
Commit
241beb6
1 Parent(s): a10728c

Fix docker file

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -16
Dockerfile CHANGED
@@ -21,22 +21,15 @@ RUN installGithub.r \
21
  rstudio/httpuv \
22
  mlverse/tok
23
 
24
-
25
- RUN Rscript -e "\
26
- options(timeout = 600);\
27
- kind <- 'cpu';\
28
- version <- '0.10.0.9000';\
29
- options(repos = c(\
30
- torch = sprintf('https://storage.googleapis.com/torch-lantern-builds/packages/%s/%s/', kind, version),\
31
- CRAN = 'https://cloud.r-project.org'\
32
- ));\
33
- install.packages('torch');\
34
- "
35
-
36
  RUN installGithub.r \
37
  mlverse/minhub
38
-
39
-
40
- ENV HUGGINGFACE_HUB_CACHE="/tmp/"
41
- COPY . .
 
 
 
 
 
42
  CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]
 
21
  rstudio/httpuv \
22
  mlverse/tok
23
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  RUN installGithub.r \
25
  mlverse/minhub
26
+
27
+ # see: https://huggingface.co/docs/hub/spaces-sdks-docker#permissions
28
+ RUN useradd -m -u 1000 user
29
+ USER user
30
+ ENV HOME=/home/user \
31
+ PATH=/home/user/.local/bin:$PATH
32
+ WORKDIR $HOME/app
33
+
34
+ COPY --chown=user . .
35
  CMD ["R", "--quiet", "-e", "shiny::runApp(host='0.0.0.0', port=7860)"]