Spaces:
Build error
Build error
Update Dockerfile
Browse filesOptimize dockerfile for cache and layer size
- Dockerfile +10 -12
Dockerfile
CHANGED
@@ -1,11 +1,7 @@
|
|
1 |
FROM nikolaik/python-nodejs:python3.9-nodejs18
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
RUN git lfs install
|
6 |
-
|
7 |
-
# Default Debian packages
|
8 |
-
RUN apt-get update && apt-get install -y \
|
9 |
build-essential \
|
10 |
libssl-dev \
|
11 |
wget \
|
@@ -16,16 +12,18 @@ RUN apt-get update && apt-get install -y \
|
|
16 |
libsm6 \
|
17 |
libxext6 \
|
18 |
cmake \
|
19 |
-
libgl1-mesa-glx
|
20 |
-
|
|
|
|
|
21 |
WORKDIR /code
|
22 |
|
23 |
-
COPY . .
|
24 |
-
RUN pip install --no-cache-dir --upgrade -r
|
25 |
|
26 |
-
|
27 |
|
28 |
-
RUN npm install && npm run build
|
29 |
|
30 |
WORKDIR /code
|
31 |
|
|
|
1 |
FROM nikolaik/python-nodejs:python3.9-nodejs18
|
2 |
|
3 |
+
RUN apt-get update && apt-get install -y \
|
4 |
+
git-lfs \
|
|
|
|
|
|
|
|
|
5 |
build-essential \
|
6 |
libssl-dev \
|
7 |
wget \
|
|
|
12 |
libsm6 \
|
13 |
libxext6 \
|
14 |
cmake \
|
15 |
+
libgl1-mesa-glx && \
|
16 |
+
rm -rf /var/lib/apt/lists/* && \
|
17 |
+
git lfs install
|
18 |
+
|
19 |
WORKDIR /code
|
20 |
|
21 |
+
COPY requirements.txt requirements.txt
|
22 |
+
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
23 |
|
24 |
+
COPY . .
|
25 |
|
26 |
+
RUN cd frontend && npm install && npm run build
|
27 |
|
28 |
WORKDIR /code
|
29 |
|