docker updates
This commit is contained in:
parent
0038cb2283
commit
9369127ef1
|
@ -1,51 +1,27 @@
|
||||||
---
|
|
||||||
title: commands
|
|
||||||
updated: 2021-11-20 17:25:07Z
|
|
||||||
created: 2021-05-04 14:58:11Z
|
|
||||||
---
|
|
||||||
|
|
||||||
# Docker
|
# Docker
|
||||||
|
|
||||||
## remove all stopped containers
|
|
||||||
|
|
||||||
- docker rm $(docker ps -a -q)
|
|
||||||
|
|
||||||
### list and remove images
|
|
||||||
|
|
||||||
- docker images
|
|
||||||
- docker rmi $(docker images -a -q)
|
|
||||||
|
|
||||||
### connect to running container
|
### connect to running container
|
||||||
|
```bash
|
||||||
docker exec -it <container-name> bash
|
docker exec -it <container-name> bash
|
||||||
|
```
|
||||||
|
### start stopped container. See <stopped-container-name> with docker ps -a
|
||||||
|
|
||||||
### Docker lifecycle
|
```bash
|
||||||
|
docker start <stopped-container-name>
|
||||||
|
```
|
||||||
|
|
||||||
1. [docker create \[OPTIONS\] IMAGE \[COMMAND\] \[ARG...\]](https://docs.docker.com/engine/reference/commandline/create/) create but doesn't start
|
### pytorch; standard container
|
||||||
2. [docker rename CONTAINER NEW_NAME](https://docs.docker.com/engine/reference/commandline/rename/)
|
|
||||||
3. [docker run \[OPTIONS\] IMAGE \[COMMAND\] \[ARG...\]](https://docs.docker.com/engine/reference/commandline/run/) run and create in one statement
|
|
||||||
4. [docker rm](https://docs.docker.com/engine/reference/commandline/rm/)
|
|
||||||
docker image rm dd9acebe0b4d
|
|
||||||
5. [docker update](https://docs.docker.com/engine/reference/commandline/update/) update configuration of one or more containers
|
|
||||||
|
|
||||||
- docker logs -f
|
```bash
|
||||||
|
docker run -it --gpus all pytorch/pytorch:latest bash
|
||||||
|
docker run -d --gpus all pytorch/pytorch:latest # run as deamon
|
||||||
|
```
|
||||||
|
docker logs -f
|
||||||
|
|
||||||
### docker ipaddress or running container
|
### docker ipaddress or running container
|
||||||
|
|
||||||
docker inspect <containernameorid>| grep '"IPAddress"' | head -n 1</containernameorid>
|
docker inspect <containernameorid>| grep '"IPAddress"' | head -n 1</containernameorid>
|
||||||
|
|
||||||
### three basic commands
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker images <ls>
|
|
||||||
docker container <ls> <-a>
|
|
||||||
docker run <name>
|
|
||||||
```
|
|
||||||
|
|
||||||
### run tensorflow and jupyter at port 8888
|
|
||||||
|
|
||||||
docker run --rm -v $(pwd):/tf/convolutional -it -p 8888:8888 tensorflow/tensorflow:latest-jupyter
|
|
||||||
|
|
||||||
### run iterative python program directly
|
### run iterative python program directly
|
||||||
|
|
||||||
docker run --rm -v $(pwd):/src --rm python:latest python /src/hello-world.py
|
docker run --rm -v $(pwd):/src --rm python:latest python /src/hello-world.py
|
||||||
|
|
11
url.md
11
url.md
|
@ -1,2 +1,11 @@
|
||||||
|
|
||||||
https://generatingconversation.substack.com/p/an-introduction-to-evaluating-llms
|
https://generatingconversation.substack.com/p/an-introduction-to-evaluating-llms
|
||||||
|
|
||||||
|
https://www.extremetech.com/tag/artificial-intelligence
|
||||||
|
https://aimagazine.com
|
||||||
|
https://emerj.com/
|
||||||
|
https://www.artificialintelligence-news.com/
|
||||||
|
https://www.dataversity.net/
|
||||||
|
https://www.aitrends.com/
|
||||||
|
https://www.analyticsinsight.net/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue