Note: Do the port mapping to this port:- 8501
sudo apt-get update -y
sudo apt-get upgrade
#Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker ubuntu
newgrp docker
(may require sudo)
sudo mkdir /app
cd /app
git clone https://github.com/jkstarling/T5OIL_SL_DOCKER_EC2.git
cd /T5OIL_SL_DOCKER_EC2
docker build -t streamlit .
docker images -a
docker run -d -p 8501:8501 entbappy/stapp
docker ps
docker stop container_id
docker rm $(docker ps -a -q)
docker login
docker push entbappy/stapp:latest
docker rmi entbappy/stapp:latest
docker pull entbappy/stapp
code removed from example here: https://docs.streamlit.io/deploy/tutorials/docker#check-network-port-accessibility
#3.93.198.219"]
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health
sudo apt update
sudo apt-get update
sudo apt upgrade -y
sudo apt install git curl unzip tar make sudo vim wget -y
sudo apt install python3-pip
Make a new folder in /home called /apps. Then copy the github repo:
sudo git clone https://github.com/jkstarling/T5OIL_SL_DOCKER_EC2.git
pip3 install -r requirements.txt
If the above doesn't work, you need to install pipx.
sudo apt install pipx
pipx ensurepath
pipx install -r requirements
(OR)
pipx install streamlit
Or if that doesn't work, try to install venv and start a virtual environment.
python3 -m venv venv
source venv/bin/activate
pip3 install streamlit
#Temporary running
python3 -m streamlit run app.py
#Permanent running
nohup python3 -m streamlit run app.py
Note: Streamlit runs on this port: 8501