Deploy Safe is a local RAG (Retrieval-Augmented Generation) system that integrates advanced Chinese semantic search capabilities. It leverages the Ollama-based LLM (Large Language Model) to provide a powerful chatbot experience. The system runs on Nginx for hosting and utilizes DuckDNS for easy access.
For the latest release, please visit here to download and execute the necessary files.
Before you begin, ensure you have the following installed:
Clone the Repository:
git clone https://github.com/duribeiro04/deploy-safe.git
cd deploy-safe
Set Up the Environment:
Create a virtual environment and activate it:
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install Dependencies:
Install the required Python packages:
pip install -r requirements.txt
For the frontend, navigate to the frontend
directory and install the necessary packages:
cd frontend
npm install
Configure Nginx:
Set up Nginx to serve your application. Create a configuration file in /etc/nginx/sites-available/deploy-safe
:
server {
listen 80;
server_name your_domain_or_IP;
location / {
proxy_pass http://localhost:8000; # Update with your backend URL
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Enable the configuration and restart Nginx:
sudo ln -s /etc/nginx/sites-available/deploy-safe /etc/nginx/sites-enabled/
sudo systemctl restart nginx
Run the Application:
Start the backend server:
uvicorn main:app --host 0.0.0.0 --port 8000
For the frontend, navigate back to the frontend
directory and run:
npm run dev
Once the application is running, you can access it through your browser at http://your_domain_or_IP
. The chatbot interface will allow you to enter queries in Chinese, and you will receive responses powered by the Ollama LLM.
The system will utilize its semantic search capabilities to provide relevant information and engage in meaningful conversations.
Deploy Safe is designed with a modular architecture. Here’s a brief overview:
We welcome contributions to Deploy Safe. If you want to contribute, please follow these steps:
git checkout -b feature/YourFeature
).git commit -m 'Add new feature'
).git push origin feature/YourFeature
).Please ensure your code adheres to the project’s coding standards and includes appropriate tests.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions or support, please reach out:
For the latest release, visit here to download and execute the necessary files.