forked from argilla-io/argilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
quickstart.Dockerfile
44 lines (34 loc) · 1.4 KB
/
quickstart.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
37
38
39
40
41
42
43
44
FROM docker.elastic.co/elasticsearch/elasticsearch:8.5.3
ENV ADMIN_USERNAME=admin
ENV ADMIN_PASSWORD=12345678
ENV ADMIN_API_KEY=admin.apikey
ENV ANNOTATOR_USERNAME=argilla
ENV ANNOTATOR_PASSWORD=12345678
ENV ARGILLA_WORKSPACE=$ADMIN_USERNAME
ENV LOAD_DATASETS=full
ENV UVICORN_PORT=6900
ENV xpack.security.enabled=false
ENV cluster.routing.allocation.disk.threshold_enabled=false
ENV discovery.type=single-node
ENV ES_JAVA_OPTS=-'Xms512m -Xmx512m'
ENV DEBIAN_FRONTEND=noninteractive
USER root
COPY scripts/start_quickstart_argilla.sh /
COPY scripts/load_data.py /
COPY quickstart.requirements.txt /packages/requirements.txt
COPY dist/*.whl /packages/
RUN apt update && \
apt install -y curl git python3.9 python3.9-dev python3.9-distutils gcc gnupg apache2-utils sudo openssl systemctl && \
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && \
python3.9 get-pip.py \
# Install Argilla
&& pip3 install -r /packages/requirements.txt && \
chmod +x /start_quickstart_argilla.sh && \
for wheel in /packages/*.whl; do pip install "$wheel"[server]; done && \
rm -rf /packages && \
rm -rf /var/lib/apt/lists/* \
# This line add context to this image. This solution should be improved
&& echo -e "{ \"deployment\": \"quickstart\" }" \
> /usr/local/lib/python3.9/dist-packages/argilla/server/static/deployment.json
USER elasticsearch
CMD ["/start_quickstart_argilla.sh"]