-
Remove all Docker containers:
docker rm -f $(docker ps -a -q)
This command forcefully removes all Docker containers, whether they are stopped or running. Useful for cleaning up your environment.
-
Remove all Docker images:
docker rmi $(docker images -a -q)
This command removes all Docker images from your system. It's a good way to free up disk space after containers have been removed.
-
Remove unknown AppArmor profiles:
sudo aa-remove-unknown
AppArmor profiles can sometimes cause conflicts with Docker containers. This command removes any unknown profiles to prevent issues.
-
Restart Docker service:
sudo systemctl restart docker.service sudo systemctl restart docker
Use these commands to restart the Docker service. Restarting Docker can resolve issues with container startup or performance.
- Access a running container:
This command opens an interactive shell inside the
docker exec -it ragas-container sh
ragas-container
Docker container, allowing you to execute commands directly within the container.
- Start Qdrant service:
This command starts the Qdrant service in a Docker container and maps it to port 6333 on your localhost. The
docker run -d --name qdrant -p 6333:6333 qdrant/qdrant curl http://localhost:6333
curl
command checks if the service is running.
-
Build the RAGAS Docker image:
docker build -t ragas -f ragas/Dockerfile .
This command builds a Docker image for RAGAS using the Dockerfile located in the
ragas
directory. -
Run the RAGAS Docker container:
docker run -it --name ragas ragas
This command runs the RAGAS Docker container in interactive mode.
-
Remove the RAGAS container:
docker rm -f ragas 2>/dev/null || true
This command forcefully removes the RAGAS Docker container if it exists, ignoring errors if the container is not found.
- Run the full setup script:
This script automates the setup process for RAGAS. It creates necessary directories, builds the Docker image, and runs the containers, all within a custom Docker network.
mkdir -p ragas/eval_dataset ragas/ragas_result ragas/source_data && \ docker rm -f qdrant && \ (docker network ls | grep -wq ragas-network || docker network create ragas-network) && \ docker build -t ragas-pipeline -f ragas/Dockerfile . && \ docker rm -f ragas-container 2>/dev/null || true && \ docker run -d --name qdrant --network ragas-network -p 6333:6333 qdrant/qdrant && \ docker run -it --name ragas-container --network ragas-network \ -v $(pwd)/ragas/eval_dataset:/app/ragas/eval_dataset \ -v $(pwd)/ragas/ragas_result:/app/ragas/ragas_result \ -v $(pwd)/ragas/source_data:/app/ragas/source_data \ ragas-pipeline
-
Set a new remote URL:
git remote set-url origin https://your-username:[email protected]/your-repo
This command updates the remote URL of your Git repository. Useful when you need to push or pull from a different repository or using a new token for authentication.
-
Pull the latest changes from the remote repository:
git pull origin
This command fetches and integrates the latest changes from the remote repository into your local branch.
- Install and update Visual Studio Code:
These commands install and update Visual Studio Code on a system running Debian-based Linux distributions.
sudo apt install apt-transport-https sudo apt update sudo apt install code