Spaces:
Runtime error
Runtime error
| 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 | |