DeFactOfficial commited on
Commit
e68b460
·
verified ·
1 Parent(s): c7cb69f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -17
Dockerfile CHANGED
@@ -13,29 +13,22 @@ LABEL maintainer="sam@defact.org" \
13
  usage="https://huggingface.co/spaces/DeFactOfficial/MMAPI"
14
 
15
  # Set up a new user named "user" with user ID 1000
16
- RUN useradd -m -u 1027 hamster
17
 
18
  # Switch to the "user" user
19
- USER hamster
20
-
21
- # Set home to the user's home directory
22
- ENV HOME=/home/hamster \
23
- PATH=/home/hamster/.local/bin:$PATH
24
-
25
- # Set the working directory to the user's home directory
26
- WORKDIR $HOME/app
27
 
28
 
29
  # Set home to the user's home directory
30
- ENV HOME=/home/hamster \
31
- PATH=/home/hamster/.local/bin:$PATH \
32
- STATIC_SITE_hamster=$HOME/code/public
33
 
34
  # Install Node.js 20 (using n instead of nodesource for better HF compatibility)
35
- RUN sudo curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
36
- && sudo bash n 20 \
37
- && sudo rm n \
38
- && sudo npm install -g npm@latest
39
 
40
  # pm2 is awesome... lets you run node.js scripts as services with zero configuration
41
  #RUN npm install pm2 -g
@@ -50,7 +43,7 @@ WORKDIR $HOME/code
50
 
51
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
52
  ADD . $HOME/code
53
- COPY --chown=hamster . $HOME/code
54
 
55
  # INSTALL NPM PACKAGES
56
  # INSTALL FFMPEG TOOLING
 
13
  usage="https://huggingface.co/spaces/DeFactOfficial/MMAPI"
14
 
15
  # Set up a new user named "user" with user ID 1000
16
+ #RUN useradd -m -u 1027 root
17
 
18
  # Switch to the "user" user
19
+ USER root
 
 
 
 
 
 
 
20
 
21
 
22
  # Set home to the user's home directory
23
+ ENV HOME=/home/root \
24
+ PATH=/home/root/.local/bin:$PATH \
25
+ STATIC_SITE_root=$HOME/code/public
26
 
27
  # Install Node.js 20 (using n instead of nodesource for better HF compatibility)
28
+ RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
29
+ && bash n 20 \
30
+ && rm n \
31
+ && npm install -g npm@latest
32
 
33
  # pm2 is awesome... lets you run node.js scripts as services with zero configuration
34
  #RUN npm install pm2 -g
 
43
 
44
  # Copy the current directory contents into the container at $HOME/app setting the owner to the user
45
  ADD . $HOME/code
46
+ COPY --chown=root . $HOME/code
47
 
48
  # INSTALL NPM PACKAGES
49
  # INSTALL FFMPEG TOOLING