krstakis commited on
Commit
0bc3d5d
·
1 Parent(s): af7def5

updated dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -5
Dockerfile CHANGED
@@ -1,26 +1,52 @@
1
  FROM python:3.9 as core
2
 
 
 
3
  COPY ./core/requirements.txt ./requirements.txt
4
  RUN pip install -r requirements.txt
5
 
6
- WORKDIR /app/core
7
-
8
  COPY ./core .
9
- RUN python ./initialization.py
 
10
 
11
  FROM python:3.9
12
 
 
 
13
  COPY ./api/requirements.txt ./requirements.txt
14
  RUN pip install -r requirements.txt
15
 
16
- WORKDIR /app/api
17
  COPY ./api .
18
 
19
- COPY --from=core /app/engine.pickle /app/engine.pickle
20
 
21
  EXPOSE 9999
 
22
  ENTRYPOINT ["python", "service_manager.py"]
23
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
  # FROM python:3.9 as build
25
  #
26
  # COPY ./requirements.txt ./requirements.txt
 
1
  FROM python:3.9 as core
2
 
3
+ WORKDIR /app/core
4
+
5
  COPY ./core/requirements.txt ./requirements.txt
6
  RUN pip install -r requirements.txt
7
 
 
 
8
  COPY ./core .
9
+
10
+ RUN python initialization.py
11
 
12
  FROM python:3.9
13
 
14
+ WORKDIR /app/api
15
+
16
  COPY ./api/requirements.txt ./requirements.txt
17
  RUN pip install -r requirements.txt
18
 
 
19
  COPY ./api .
20
 
21
+ COPY --from=core /app/core/engine.pickle /app/api/engine.pickle
22
 
23
  EXPOSE 9999
24
+
25
  ENTRYPOINT ["python", "service_manager.py"]
26
 
27
+ # FROM python:3.9 as core
28
+ #
29
+ # COPY ./core/requirements.txt ./requirements.txt
30
+ # RUN pip install -r requirements.txt
31
+ #
32
+ # WORKDIR /app/core
33
+ #
34
+ # COPY ./core .
35
+ # RUN python ./initialization.py
36
+ #
37
+ # FROM python:3.9
38
+ #
39
+ # COPY ./api/requirements.txt ./requirements.txt
40
+ # RUN pip install -r requirements.txt
41
+ #
42
+ # WORKDIR /app/api
43
+ # COPY ./api .
44
+ #
45
+ # COPY --from=core /app/engine.pickle /app/engine.pickle
46
+ #
47
+ # EXPOSE 9999
48
+ # ENTRYPOINT ["python", "service_manager.py"]
49
+
50
  # FROM python:3.9 as build
51
  #
52
  # COPY ./requirements.txt ./requirements.txt