[英]Building tensorflow-serving docker gpu from source with docker?
I have followed these steps for building docker from source,我已按照这些步骤从源代码构建 docker,
git clone https://github.com/tensorflow/serving
cd serving
docker build --pull -t $USER/tensorflow-serving-devel-gpu \
-f tensorflow_serving/tools/docker/Dockerfile.devel-gpu .
docker build -t $USER/tensorflow-serving-gpu \
--build-arg TF_SERVING_BUILD_IMAGE=$USER/tensorflow-serving-devel-gpu \
-f tensorflow_serving/tools/docker/Dockerfile.gpu .
These took quite a long time for get compiled and it was completed successfully,这些花费了相当长的时间编译并成功完成,
Now if I check docker images
, I see this below response,现在,如果我检查docker images
,我会看到以下响应,
REPOSITORY TAG IMAGE ID CREATED SIZE
root/tensorflow-serving-gpu latest 42e221bb6bc9 About an hour ago 8.49GB
root/tensorflow-serving-devel-gpu latest 7fd974e5e0c5 2 hours ago 21.8GB
nvidia/cuda 11.0-cudnn8-devel-ubuntu18.04 7c49b261611b 3 months ago 7.41GB
I have two doubts regarding this,对此我有两个疑问,
Building from source took a large amount of time, and now I want to backup /save these images or containers and save them so I can re-use them later on different machine with same arch.从源代码构建花费了大量时间,现在我想备份/保存这些图像或容器并保存它们,以便以后可以在具有相同拱门的不同机器上重新使用它们。 If you know how to do it, please help me with the commands.如果你知道怎么做,请帮助我使用命令。
Since I completed the build successfully, I need to free up some space by removing unnecessary docker development images used to build tensorflow-serving-gpu?由于我成功完成了构建,我需要通过删除用于构建 tensorflow-serving-gpu 的不必要的 docker 开发图像来释放一些空间? I have three images here which are related to tensorflow serving and I don't know which one to delete?我这里有三张与 tensorflow 服务相关的图片,我不知道要删除哪一张?
If you want to save images:如果要保存图像:
docker save root/tensorflow-serving-gpu:latest -o tfs.tar
And if you want to load it:如果你想加载它:
docker load -i tfs.tar
root/tensorflow-serving-gpu
and root/tensorflow-serving-devel-gpu
are two different images. root/tensorflow-serving-gpu
和root/tensorflow-serving-devel-gpu
是两个不同的图像。 You can see the differences by looking at the details of Dockerfile.devel-gpu
and Dockerfile.gpu
.您可以通过查看Dockerfile.devel-gpu
和Dockerfile.gpu
的详细信息来了解差异。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.