Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +16 -37
Dockerfile
CHANGED
@@ -1,47 +1,26 @@
|
|
1 |
-
FROM
|
2 |
|
3 |
-
|
|
|
|
|
4 |
|
5 |
-
|
6 |
-
RUN apt-get update && apt-get upgrade -y
|
7 |
|
8 |
-
|
9 |
-
RUN apt-get install -y \
|
10 |
-
curl \
|
11 |
-
speedtest-cli \
|
12 |
-
neofetch \
|
13 |
-
ffmpeg \
|
14 |
-
imagemagick \
|
15 |
-
git \
|
16 |
-
git-lfs \
|
17 |
-
nodejs \
|
18 |
-
npm \
|
19 |
-
software-properties-common
|
20 |
|
21 |
-
|
22 |
-
RUN npm install -g n && n latest
|
23 |
|
24 |
-
|
25 |
-
RUN npm install -g npm@latest
|
26 |
|
27 |
-
# Create a
|
28 |
-
RUN
|
|
|
29 |
|
30 |
-
# Install
|
31 |
-
RUN
|
32 |
|
33 |
-
|
34 |
-
USER nex
|
35 |
|
36 |
-
|
37 |
-
ENV HOME=/home/nex \
|
38 |
-
PATH=/home/nex/.local/bin:$PATH
|
39 |
|
40 |
-
|
41 |
-
WORKDIR $HOME
|
42 |
-
|
43 |
-
# Copy the application code
|
44 |
-
COPY --chown=nex . $HOME/server
|
45 |
-
|
46 |
-
# Start code-server
|
47 |
-
CMD ["code-server", ".", "--bind-addr", "0.0.0.0:7860", "--auth", "none"]
|
|
|
1 |
+
FROM node:latest
|
2 |
|
3 |
+
RUN apt-get update && \
|
4 |
+
apt-get install -y neofetch ffmpeg curl python3 python3-pip python3-venv build-essential libvips libvips-dev libjpeg-dev libpng-dev && \
|
5 |
+
rm -rf /var/lib/apt/lists/*
|
6 |
|
7 |
+
WORKDIR /app
|
|
|
8 |
|
9 |
+
COPY package.json .
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
+
RUN npm install -g npm@latest node-gyp
|
|
|
12 |
|
13 |
+
RUN npm install
|
|
|
14 |
|
15 |
+
# Create and activate a virtual environment
|
16 |
+
RUN python3 -m venv /venv
|
17 |
+
ENV PATH="/venv/bin:$PATH"
|
18 |
|
19 |
+
# Install speedtest-cli within the virtual environment
|
20 |
+
RUN pip install --no-cache-dir speedtest-cli
|
21 |
|
22 |
+
COPY . .
|
|
|
23 |
|
24 |
+
EXPOSE 7860
|
|
|
|
|
25 |
|
26 |
+
CMD ["node", "index.js"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|