forked from HumanSignal/label-studio
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
36 lines (28 loc) · 1.1 KB
/
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
# syntax=docker/dockerfile:1.3
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive \
PIP_CACHE_DIR=/.cache \
DJANGO_SETTINGS_MODULE=core.settings.label_studio \
LABEL_STUDIO_BASE_DATA_DIR=/label-studio/data \
SETUPTOOLS_USE_DISTUTILS=stdlib
WORKDIR /label-studio
# install packages
RUN set -eux; \
apt-get update && apt-get install --no-install-recommends --no-install-suggests -y \
build-essential postgresql-client libmysqlclient-dev mysql-client python3.8 python3-pip python3.8-dev \
uwsgi git libxml2-dev libxslt-dev zlib1g-dev
# Copy and install middleware dependencies
COPY deploy/requirements-mw.txt /label-studio
RUN --mount=type=cache,target=$PIP_CACHE_DIR \
pip3 install -r requirements-mw.txt
# Copy and install requirements.txt first for caching
COPY deploy/requirements.txt /label-studio
RUN --mount=type=cache,target=$PIP_CACHE_DIR \
pip3 install -r requirements.txt
COPY . /label-studio
RUN --mount=type=cache,target=$PIP_CACHE_DIR \
pip3 install -e .
EXPOSE 8080
RUN ./deploy/prebuild_wo_frontend.sh
ENTRYPOINT ["./deploy/docker-entrypoint.sh"]
CMD ["label-studio"]