Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
# Start with Ubuntu 24.04 (Noble)
|
| 2 |
-
FROM ubuntu:
|
| 3 |
|
| 4 |
# Avoid prompts from apt
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
@@ -28,20 +28,20 @@ RUN curl -L https://raw.githubusercontent.com/tj/n/master/bin/n -o n \
|
|
| 28 |
&& npm install -g npm@latest
|
| 29 |
|
| 30 |
# pm2 is awesome... lets you run node.js scripts as services with zero configuration
|
| 31 |
-
RUN npm install pm2 -g
|
| 32 |
|
| 33 |
# Create working directory that matches HF Spaces expectations
|
| 34 |
-
WORKDIR $HOME/code
|
| 35 |
|
| 36 |
# Clone your repository (replace with your actual repo URL)
|
| 37 |
-
RUN git clone https://huggingface.co/spaces/DeFactOfficial/MMAPI .
|
| 38 |
|
| 39 |
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
|
| 40 |
-
RUN git pull
|
| 41 |
|
| 42 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 43 |
-
ADD . $HOME/code
|
| 44 |
-
COPY --chown=root . $HOME/code
|
| 45 |
|
| 46 |
# INSTALL NPM PACKAGES
|
| 47 |
# INSTALL FFMPEG TOOLING
|
|
@@ -54,7 +54,7 @@ EXPOSE 7860
|
|
| 54 |
|
| 55 |
# Configure nginx
|
| 56 |
RUN rm -f /etc/nginx/sites-enabled/default
|
| 57 |
-
COPY
|
| 58 |
RUN ln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/
|
| 59 |
|
| 60 |
# Stop all old instances of the api service
|
|
|
|
| 1 |
# Start with Ubuntu 24.04 (Noble)
|
| 2 |
+
FROM ubuntu:oracular
|
| 3 |
|
| 4 |
# Avoid prompts from apt
|
| 5 |
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
| 28 |
&& npm install -g npm@latest
|
| 29 |
|
| 30 |
# pm2 is awesome... lets you run node.js scripts as services with zero configuration
|
| 31 |
+
RUN npm install pm2 -g skipcache
|
| 32 |
|
| 33 |
# Create working directory that matches HF Spaces expectations
|
| 34 |
+
WORKDIR $HOME/code skipcache
|
| 35 |
|
| 36 |
# Clone your repository (replace with your actual repo URL)
|
| 37 |
+
RUN git clone https://huggingface.co/spaces/DeFactOfficial/MMAPI . skipcache
|
| 38 |
|
| 39 |
ADD "https://www.random.org/cgi-bin/randbyte?nbytes=10&format=h" skipcache
|
| 40 |
+
RUN git pull skipcache
|
| 41 |
|
| 42 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
| 43 |
+
ADD . $HOME/code skipcache
|
| 44 |
+
COPY --chown=root . $HOME/code skipcache
|
| 45 |
|
| 46 |
# INSTALL NPM PACKAGES
|
| 47 |
# INSTALL FFMPEG TOOLING
|
|
|
|
| 54 |
|
| 55 |
# Configure nginx
|
| 56 |
RUN rm -f /etc/nginx/sites-enabled/default
|
| 57 |
+
COPY ./conf/nginx.conf /etc/nginx/sites-available/reverse-proxy.conf
|
| 58 |
RUN ln -s /etc/nginx/sites-available/reverse-proxy.conf /etc/nginx/sites-enabled/
|
| 59 |
|
| 60 |
# Stop all old instances of the api service
|