This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## delete containers | |
docker system prune -a --volumes | |
## build docker | |
docker build -t test . | |
## run docker | |
docker run -it --gpus all -v $(pwd):/app -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix test bash | |
docker run --gpus=all --rm --network=host -it -v %cd%/:/app test bash |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !pip install ping3 | |
import ping3 | |
def ping_device(ip_address): | |
result = ping3.ping(ip_address) | |
if result is not None: | |
print(f"Device {ip_address} is reachable. Round-trip time: {result} ms") | |
else: | |
print(f"Device {ip_address} is unreachable.") |