The Smart-Campus system is developed by Lynx InfoSec.
This is a demo video recorded for the project:
Before building or pulling the repository, ensure the following two commands are executed to ensure correct line endings:
git config --global core.autocrlf false
git config --global core.eol lfThese configurations will ensure that line-endings match those used by Unix-based systems (for docker setup).
-
Navigate to the
frontendfolder:cd frontend -
Install the required dependencies:
npm install
-
Run the development server:
npm run dev
The frontend should now be accessible via http://localhost:3000 (or a similar port based on your configuration).
The backend is designed to be highly scalable, using Celery for image processing tasks. Multiple workers running on different machines can collaborate as long as they can access the same Redis instance.
- Install Docker Desktop to run the backend via Docker containers.
-
Prepare Environment Variables:
Copy the
.env.copyfile to.envand fill in the required information.cp .env.copy .env
-
Build Docker Containers:
Build the Docker containers, which may take some time depending on your internet speed.
docker-compose build
-
Start Docker Containers:
Once the containers are built, start them to run all required services:
docker-compose up
By default, the FastAPI backend will be accessible at
http://localhost:8000. Flower will be accessible athttp://localhost:5555for monitoring Celery workers.
If you want to leverage NVIDIA GPUs for production, ensure the following:
-
Install the appropriate NVIDIA drivers for your system.
-
Install the NVIDIA Container Toolkit.
-
Use the production Docker Compose file to start the containers with GPU access:
sudo docker compose -f docker-compose.prod.yml up
This will enable GPU acceleration for tasks that support it.
Celery workers are an integral part of this system. For a basic demo setup, use 1 worker for each type of task. Ensure that the Celery workers and FastAPI can access the same Redis instance for operation.
-
Local Deployment: The provided Docker setup is intended for local development. For a production or more scalable deployment, you will need to adjust the Docker configuration in
docker-compose.ymlfor your specific environment needs. -
Scaling: For a scalable production environment, consider using multiple machines and scaling Celery workers. Ensure that all machines can access the same Redis instance for coordination and task routing.