XciD HF staff commited on
Commit
9188b2e
1 Parent(s): 9abe28f

Update Dockerfile

Browse files

Optimize dockerfile for cache and layer size

Files changed (1) hide show
  1. Dockerfile +10 -12
Dockerfile CHANGED
@@ -1,11 +1,7 @@
1
  FROM nikolaik/python-nodejs:python3.9-nodejs18
2
 
3
- # Git LFS
4
- RUN apt-get update && apt-get install -y git-lfs
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 /code/requirements.txt
25
 
26
- WORKDIR /code/frontend
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