Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +10 -17
Dockerfile
CHANGED
|
@@ -13,29 +13,22 @@ LABEL maintainer="[email protected]" \
|
|
| 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
|
| 17 |
|
| 18 |
# Switch to the "user" user
|
| 19 |
-
USER
|
| 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/
|
| 31 |
-
PATH=/home/
|
| 32 |
-
|
| 33 |
|
| 34 |
# Install Node.js 20 (using n instead of nodesource for better HF compatibility)
|
| 35 |
-
RUN
|
| 36 |
-
&&
|
| 37 |
-
&&
|
| 38 |
-
&&
|
| 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=
|
| 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
|