Torch / PyTorch¶
Check if Torch can find your GPU
import torch; torch.cuda.is_available()
It should return
True
; otherwise, Torch cannot find your GPU.
Anaconda / Conda¶
Create a new conda environment
conda create -n env_name
Create a new conda environment with a specific Python version and libraries
conda create -n env_name python=3.11 pandas matplotlib
Deactivate a conda environment
conda deactivate
Remove a conda environment
conda remove -n env_name --all
Docker Commands¶
List all Docker containers (including stopped ones)
docker ps -a
List all Docker images
docker images
See hardware usage of running Docker images
docker stats
Remove a Docker container
docker rm -f <container_id>
Enter the shell of a running Docker container
sudo docker exec -it <container_id> /bin/bash
Run Open-WebUI using Docker to make it accessible across the network
sudo docker run -d --network=host -v open-webui:/app/backend/data \ -e OLLAMA_BASE_URL=http://127.0.0.1:11434 \ --name open-webui-main --restart always \ ghcr.io/open-webui/open-webui:cuda
SCP (Secure Copy)¶
Send a file from your local computer to a remote machine
scp [options/flags] path/to/local/file remote_user@remote_ip:/path/to/destination
Find your
remote_user
using thewhoami
command.Find your remote machine’s IP address using
hostname -I
.
Example:
scp -r ./models appuser@192.168.1.229:/usr/share/ollama/.ollama/models
Rsync and Parallel for Fast File Transfers¶
(Stay tuned! It’s coming soon)