File tree Expand file tree Collapse file tree 1 file changed +24
-20
lines changed Expand file tree Collapse file tree 1 file changed +24
-20
lines changed Original file line number Diff line number Diff line change 1
1
FROM phusion/baseimage:jammy-1.0.3
2
2
3
- WORKDIR /opt/app
4
-
5
- COPY . /opt/app
6
-
7
- WORKDIR /opt/app/fact_extractor
8
-
9
- ARG USER=root
10
- ARG DEBIAN_FRONTEND=noninteractive
11
-
12
- RUN install_clean python3.11 python3.11-dev python3.11-venv gcc
13
-
14
- RUN python3.11 -m venv venv
15
-
16
- RUN . venv/bin/activate && install/pre_install.sh
17
-
18
- RUN . venv/bin/activate && venv/bin/python3.11 install.py
19
-
20
- ENV PATH=/opt/app/fact_extractor/venv/bin:$PATH
21
-
22
- ENTRYPOINT ["./docker_extraction.py" ]
3
+ RUN --mount=type=cache,target=/var/cache/apt \
4
+ apt update && apt install -y \
5
+ python3.11 \
6
+ python3.11-dev \
7
+ python3.11-venv \
8
+ gcc
9
+
10
+ RUN python3.11 -m venv /venv
11
+ ENV PATH=/venv/bin:$PATH \
12
+ VIRTUAL_ENV=/venv \
13
+ PYTHONPATH=/app/fact_extractor
14
+
15
+ ADD ./fact_extractor/install/pre_install.sh /app/fact_extractor/install/pre_install.sh
16
+ RUN --mount=type=cache,target=/var/cache/apt \
17
+ --mount=type=cache,target=/root/.cache/pip \
18
+ /app/fact_extractor/install/pre_install.sh
19
+
20
+ ADD . /app
21
+ RUN --mount=type=cache,target=/var/cache/apt \
22
+ --mount=type=cache,target=/root/.cache/pip \
23
+ /app/fact_extractor/install.py
24
+
25
+
26
+ ENTRYPOINT ["/app/fact_extractor/docker_extraction.py" ]
You can’t perform that action at this time.
0 commit comments