forked from asreview/asreview
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (28 loc) · 937 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# First stage
FROM python:3.11-slim AS builder
WORKDIR /app
# Copy and build asreview
# git is used by versioneer to define the project version
COPY . /app
RUN apt-get update \
&& apt-get install -y git npm \
&& pip3 install --upgrade pip setuptools \
&& python3 setup.py compile_assets \
&& pip3 install --user gunicorn \
&& pip3 install --user . \
&& pip3 install --user asreview-datatools asreview-insights asreview-makita asreview-wordcloud
# Second stage
FROM python:3.11-slim
VOLUME /project_folder
WORKDIR /app
# Install psycopg2 as this can't be done in the first stage
# https://stackoverflow.com/a/65352673
RUN apt-get update \
&& apt-get install -y build-essential libpq-dev\
&& pip3 install --user psycopg2
COPY --from=builder /root/.local /root/.local
ENV ASREVIEW_LAB_HOST=0.0.0.0
ENV PATH=/root/.local/bin:$PATH
ENV ASREVIEW_PATH=/project_folder
EXPOSE 5000
ENTRYPOINT ["asreview"]