ev6 commited on
Commit
fcb32c9
·
verified ·
1 Parent(s): 1bb2cab

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -26
Dockerfile CHANGED
@@ -1,26 +1,24 @@
1
- FROM python:3.9-slim
2
-
3
- WORKDIR /app
4
-
5
- # Установка системных зависимостей
6
- RUN apt-get update && apt-get install -y \
7
- libhdf5-dev \
8
- libc-dev \
9
- libatlas-base-dev \
10
- libpython3-dev \
11
- python3-pip \
12
- gfortran && \
13
- apk --no-cache add musl-dev linux-headers g++ \
14
- rm -rf /var/lib/apt/lists/*
15
-
16
- # Копирование проекта
17
- COPY . /app
18
-
19
- # Установка Python-зависимостей
20
- RUN pip install --no-cache-dir --upgrade pip
21
- RUN pip install --no-cache-dir tensorflow-cpu==2.9.1
22
- RUN pip install --no-cache-dir -r requirements.txt
23
-
24
- EXPOSE 8000
25
-
26
- CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]
 
1
+ FROM --platform=$BUILDPLATFORM python:3.10-alpine AS builder
2
+
3
+ WORKDIR /app
4
+
5
+ RUN apk --no-cache add \
6
+ libhdf5-dev \
7
+ musl-dev \
8
+ linux-headers \
9
+ gfortran \
10
+ libpython3-dev \
11
+ libstdc++ \
12
+ lapack-dev
13
+
14
+ # Копирование проекта
15
+ COPY . /app
16
+
17
+ # Установка Python-зависимостей
18
+ RUN pip install --no-cache-dir --upgrade pip
19
+ RUN pip install --no-cache-dir tensorflow-cpu==2.9.1
20
+ RUN pip install --no-cache-dir -r requirements.txt
21
+
22
+ EXPOSE 8000
23
+
24
+ CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"]