rhoitjadhav commited on
Commit
4fb7496
·
1 Parent(s): 707e34e

update dockerfile

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -2
  2. start.sh +2 -2
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM python:3.9-slim
2
 
3
  # Exposing ports
4
  EXPOSE 6900
@@ -16,7 +16,9 @@ COPY load_data.py /
16
 
17
  # Install packages
18
  RUN apt update
19
- RUN apt -y install python3.9-dev gcc gnupg apache2-utils systemctl curl sudo vim
 
 
20
 
21
  # Create new user for starting elasticsearch
22
  RUN useradd -ms /bin/bash user -p "$(openssl passwd -1 ubuntu)"
 
1
+ FROM ubuntu:20.04
2
 
3
  # Exposing ports
4
  EXPOSE 6900
 
16
 
17
  # Install packages
18
  RUN apt update
19
+ RUN apt -y install curl python3.9 python3.9-dev python3.9-distutils gcc gnupg apache2-utils sudo openssl systemctl
20
+ RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
21
+ RUN python3.9 get-pip.py
22
 
23
  # Create new user for starting elasticsearch
24
  RUN useradd -ms /bin/bash user -p "$(openssl passwd -1 ubuntu)"
start.sh CHANGED
@@ -3,7 +3,7 @@
3
  set -e
4
 
5
  # Changing user
6
- sudo -S <<< "ubuntu" su user
7
 
8
  # Generate hashed passwords
9
  admin_password=$(htpasswd -nbB "" "$ADMIN_PASSWORD" | cut -d ":" -f 2 | tr -d "\n")
@@ -41,7 +41,7 @@ sudo systemctl enable elasticsearch
41
  sudo systemctl start elasticsearch
42
 
43
  # Load data
44
- python /app/load_data.py &
45
 
46
  # Start argilla
47
  uvicorn argilla:app --host "0.0.0.0"
 
3
  set -e
4
 
5
  # Changing user
6
+ echo "ubuntu" | sudo -S su user
7
 
8
  # Generate hashed passwords
9
  admin_password=$(htpasswd -nbB "" "$ADMIN_PASSWORD" | cut -d ":" -f 2 | tr -d "\n")
 
41
  sudo systemctl start elasticsearch
42
 
43
  # Load data
44
+ python3.9 /app/load_data.py &
45
 
46
  # Start argilla
47
  uvicorn argilla:app --host "0.0.0.0"