-
Ensure the python3 version is 3.8.12. To check, run python3 -V. If you do not have it, you can install it here
-
Setup a virtual environment in the project folder using python3: $ python3 -m venv venv
-
Start the virtual environment. You should see (venv) in as part of the command prompt once it is started: $ source venv/bin/activate NOTE: To stop the virtual environment at any time, run (venv) $ deactivate
-
Install all the requirements, including flask. Be sure not to use sudo as this will install flask in the global environment instead of the virtual environment: (venv) $ pip3 install -r requirements.txt
-
Start server ==> uvicorn main:app --host 0.0.0.0 --port 8000
-
login with root
-
cd ..
-
cd /var/horizon_nsfw
-
Start server ==> uvicorn main:app --host 0.0.0.0 --port 8000
pip3 freeze > requirements.txt
https://levelup.gitconnected.com/install-multiple-python-versions-on-mac-a58b1966825f
RUN apt-get update RUN apt-get install ffmpeg libsm6 libxext6 -y
video==> https://nsfw.xxx/ image==> https://github.com/EBazarov/nsfw_data_source_urls
==> https://github.com/bhky/opennsfw2
https://www.cyberciti.biz/faq/how-to-install-docker-on-amazon-linux-2/
#!/bin/bash docker build --no-cache . -t nsfw_backend3.8:latest
sudo systemctl enable docker.service sudo systemctl start docker.service sudo systemctl status docker.service
check runnign process
- docker ps
stop running process docker stop container_hash
nginix
sudo service nginx start sudo service nginx status sudo service nginx stop