Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +49 -49
Dockerfile
CHANGED
@@ -1,49 +1,49 @@
|
|
1 |
-
FROM nvidia/cuda:11.3.1-base-ubuntu20.04
|
2 |
-
|
3 |
-
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
-
TZ=Europe/Paris
|
5 |
-
|
6 |
-
# Remove any third-party apt sources to avoid issues with expiring keys.
|
7 |
-
# Install some basic utilities
|
8 |
-
RUN rm -f /etc/apt/sources.list.d/*.list && \
|
9 |
-
apt-get update && apt-get install -y --no-install-recommends \
|
10 |
-
curl \
|
11 |
-
ca-certificates \
|
12 |
-
sudo \
|
13 |
-
git \
|
14 |
-
wget \
|
15 |
-
procps \
|
16 |
-
git-lfs \
|
17 |
-
zip \
|
18 |
-
unzip \
|
19 |
-
htop \
|
20 |
-
vim \
|
21 |
-
nano \
|
22 |
-
bzip2 \
|
23 |
-
libx11-6 \
|
24 |
-
build-essential \
|
25 |
-
libsndfile-dev \
|
26 |
-
software-properties-common \
|
27 |
-
&& rm -rf /var/lib/apt/lists/*
|
28 |
-
|
29 |
-
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
|
30 |
-
apt-get install -y nodejs && \
|
31 |
-
npm install -g configurable-http-proxy
|
32 |
-
|
33 |
-
# Tạo thư mục làm việc trong container
|
34 |
-
WORKDIR /app
|
35 |
-
COPY package*.json ./
|
36 |
-
COPY package-lock*.json ./
|
37 |
-
COPY . .
|
38 |
-
|
39 |
-
# Cài đặt các phụ thuộc
|
40 |
-
RUN npm install
|
41 |
-
|
42 |
-
# Cấp quyền đọc/ghi cho thư mục
|
43 |
-
RUN chmod -R 755 /app
|
44 |
-
|
45 |
-
# Expose port mà ứng dụng sẽ chạy
|
46 |
-
EXPOSE 25645
|
47 |
-
|
48 |
-
# Lệnh để chạy ứng dụng
|
49 |
-
CMD ["npm", "start"]
|
|
|
1 |
+
FROM nvidia/cuda:11.3.1-base-ubuntu20.04
|
2 |
+
|
3 |
+
ENV DEBIAN_FRONTEND=noninteractive \
|
4 |
+
TZ=Europe/Paris
|
5 |
+
|
6 |
+
# Remove any third-party apt sources to avoid issues with expiring keys.
|
7 |
+
# Install some basic utilities
|
8 |
+
RUN rm -f /etc/apt/sources.list.d/*.list && \
|
9 |
+
apt-get update && apt-get install -y --no-install-recommends \
|
10 |
+
curl \
|
11 |
+
ca-certificates \
|
12 |
+
sudo \
|
13 |
+
git \
|
14 |
+
wget \
|
15 |
+
procps \
|
16 |
+
git-lfs \
|
17 |
+
zip \
|
18 |
+
unzip \
|
19 |
+
htop \
|
20 |
+
vim \
|
21 |
+
nano \
|
22 |
+
bzip2 \
|
23 |
+
libx11-6 \
|
24 |
+
build-essential \
|
25 |
+
libsndfile-dev \
|
26 |
+
software-properties-common \
|
27 |
+
&& rm -rf /var/lib/apt/lists/*
|
28 |
+
|
29 |
+
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && \
|
30 |
+
apt-get install -y nodejs && \
|
31 |
+
npm install -g configurable-http-proxy
|
32 |
+
|
33 |
+
# Tạo thư mục làm việc trong container
|
34 |
+
WORKDIR /app
|
35 |
+
COPY package*.json ./
|
36 |
+
COPY package-lock*.json ./
|
37 |
+
COPY . .
|
38 |
+
|
39 |
+
# Cài đặt các phụ thuộc
|
40 |
+
RUN npm install
|
41 |
+
RUN npx puppeteer browsers install chrome
|
42 |
+
# Cấp quyền đọc/ghi cho thư mục
|
43 |
+
RUN chmod -R 755 /app
|
44 |
+
|
45 |
+
# Expose port mà ứng dụng sẽ chạy
|
46 |
+
EXPOSE 25645
|
47 |
+
|
48 |
+
# Lệnh để chạy ứng dụng
|
49 |
+
CMD ["npm", "start"]
|