Spaces:
Runtime error
Runtime error
| FROM ubuntu:20.04 | |
| # Exposing ports | |
| EXPOSE 6900 | |
| # Working Directory | |
| WORKDIR /app | |
| # Environment variables | |
| ENV ARGILLA_LOCAL_AUTH_USERS_DB_FILE=/app/users.yml | |
| ENV UVICORN_PORT=6900 | |
| # Install Python | |
| RUN apt update | |
| RUN apt -y install curl python3.9 python3.9-dev python3.9-distutils gcc gnupg apache2-utils sudo | |
| RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py | |
| RUN python3.9 get-pip.py | |
| # Install argilla | |
| RUN pip install argilla[server] | |
| # Install Elasticsearch | |
| RUN curl -fsSL https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add - | |
| RUN echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.list | |
| RUN apt update | |
| RUN apt -y install elasticsearch | |
| RUN service elasticsearch start | |
| # Copy users db file along with execution script | |
| COPY users.yml /app | |
| COPY start.sh /app | |
| RUN chmod +x /app/start.sh | |
| RUN chmod -R 777 /app | |
| RUN useradd -ms /bin/bash user | |
| # Executing argilla along with elasticsearch | |
| CMD /bin/bash /app/start.sh | |