File size: 1,190 Bytes
4fb7496
cf13325
d4d41c8
 
cf13325
d4d41c8
b2577d0
d4d41c8
cf13325
b2577d0
 
 
 
 
 
44b1b38
b2577d0
 
d4d41c8
4fb7496
 
 
b2577d0
 
 
 
cf13325
d4d41c8
b2577d0
 
cf13325
d4d41c8
 
b2577d0
d4d41c8
b2577d0
1fdc52f
5e42df4
b2577d0
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
FROM ubuntu:20.04

# Exposing ports
EXPOSE 6900

# Environment variables
ENV ARGILLA_LOCAL_AUTH_USERS_DB_FILE=/packages/users.yml
ENV UVICORN_PORT=6900

# Copying argilla distribution files
COPY *.whl /packages/

# Copy users db file along with execution script
COPY start.sh /
COPY load_data.py /
COPY users.yml /packages/

# Install packages
RUN apt update
RUN apt -y install curl python3.9 python3.9-dev python3.9-distutils gcc gnupg apache2-utils sudo openssl systemctl
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python3.9 get-pip.py

# Create new user for starting elasticsearch
RUN useradd -ms /bin/bash user -p "$(openssl passwd -1 ubuntu)"
RUN echo 'user ALL=(ALL)   ALL' >> /etc/sudoers

# Install argilla
RUN chmod +x /start.sh \
    && for wheel in /packages/*.whl; do pip install "$wheel"[server]; done

# Install Elasticsearch
RUN curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
RUN echo "deb https://artifacts.elastic.co/packages/8.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-8.x.list
RUN apt update
RUN apt -y install elasticsearch=8.5.3

# Executing argilla along with elasticsearch
CMD /bin/bash /start.sh