rhoitjadhav's picture
update dockerfile
8b0f037
raw
history blame
1.11 kB
FROM python:3.9-slim
# 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 start_test.sh /
COPY load_data.py /
COPY users.yml /packages/
# Install packages
RUN apt update
RUN apt -y install python3.9-dev gcc gnupg apache2-utils systemctl curl sudo vim
# Create new user for starting elasticsearch
RUN useradd -ms /bin/bash user -p "$(openssl passwd -1 ubuntu)"
RUN echo 'user ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
# Install argilla
RUN chmod +x /start.sh \
&& for wheel in /packages/*.whl; do pip3 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.0
# Executing argilla along with elasticsearch
CMD /bin/bash /start_test.sh