-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
34 lines (24 loc) · 987 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
# syntax=docker/dockerfile:1.3
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive \
PIP_CACHE_DIR=/.cache
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
RUN --mount=type=cache,target=$PIP_CACHE_DIR \
pip3 install --upgrade pip setuptools && pip3 install uwsgi
# 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
ENV DJANGO_SETTINGS_MODULE=core.settings.label_studio
ENV LABEL_STUDIO_BASE_DATA_DIR=/label-studio/data
COPY . /label-studio
RUN python3.8 setup.py develop
EXPOSE 8080
RUN ./deploy/prebuild_wo_frontend.sh
ENTRYPOINT ["./deploy/docker-entrypoint.sh"]
CMD ["label-studio"]