首页 > 其他分享 >深度学习的初学者用哪本书比较好的?

深度学习的初学者用哪本书比较好的?

时间:2022-12-15 20:23:04浏览次数:62  
标签:本书 container runner image access entrypoint 初学者 深度 Docker

Override the entrypoint of an image

Introduced in GitLab and GitLab Runner 9.4. Read more about the extended configuration options.

Before explaining the available entrypoint override methods, let’s describe how the runner starts. It uses a Docker image for the containers used in the CI/CD jobs:

  1. The runner starts a Docker container using the defined entrypoint. The default from Dockerfile that may be overridden in the .gitlab-ci.yml file.
  2. The runner attaches itself to a running container.
  3. The runner prepares a script (the combination of before_scriptscript, and after_script).
  4. The runner sends the script to the container’s shell stdin and receives the output.

To override the entrypoint of a Docker image, define an empty entrypoint in the .gitlab-ci.yml file, so the runner does not start a useless shell layer. However, that does not work for all Docker versions.

  • For Docker 17.06 and later, the entrypoint can be set to an empty value.
  • For Docker 17.03 and earlier, the entrypoint can be set to /bin/sh -c/bin/bash -c, or an equivalent shell available in the image.

The syntax of image:entrypoint is similar to Dockerfile’s ENTRYPOINT.

Let’s assume you have a super/sql:experimental image with a SQL database in it. You want to use it as a base image for your job because you want to execute some tests with this database binary. Let’s also assume that this image is configured with /usr/bin/super-sql run as an entrypoint. When the container starts without additional options, it runs the database’s process. The runner expects that the image has no entrypoint or that the entrypoint is prepared to start a shell command.

With the extended Docker configuration options, instead of:

  • Creating your own image based on super/sql:experimental.
  • Setting the ENTRYPOINT to a shell.
  • Using the new image in your CI job.

You can now define an entrypoint in the .gitlab-ci.yml file.

For Docker 17.06 and later:

image:
  name: super/sql:experimental
  entrypoint: [""]

For Docker 17.03 and earlier:

image:
  name: super/sql:experimental
  entrypoint: ["/bin/sh", "-c"]

Define image and services in config.toml

Look for the [runners.docker] section:

[runners.docker]
  image = "ruby:latest"
  services = ["mysql:latest", "postgres:latest"]

The image and services defined this way are added to all jobs run by that runner.

Access an image from a private Container Registry

To access private container registries, the GitLab Runner process can use:

To define which option should be used, the runner process reads the configuration in this order:

  • DOCKER_AUTH_CONFIG CI/CD variable.
  • DOCKER_AUTH_CONFIG environment variable set in the runner’s config.toml file.
  • config.json file in $HOME/.docker directory of the user running the process. If the --user flag is provided to run the child processes as unprivileged user, the home directory of the main runner process user is used.

Requirements and limitations

  • Available for Kubernetes executor in GitLab Runner 13.1 and later.
  • Credentials Store and Credential Helpers require binaries to be added to the GitLab Runner $PATH, and require access to do so. Therefore, these features are not available on shared runners, or any other runner where the user does not have access to the environment where the runner is installed.

Use statically-defined credentials

There are two approaches that you can take to access a private registry. Both require setting the CI/CD variable DOCKER_AUTH_CONFIG with appropriate authentication information.

  1. Per-job: To configure one job to access a private registry, add DOCKER_AUTH_CONFIG as a CI/CD variable.
  2. Per-runner: To configure a runner so all its jobs can access a private registry, add DOCKER_AUTH_CONFIG as an environment variable in the runner’s configuration.

标签:本书,container,runner,image,access,entrypoint,初学者,深度,Docker
From: https://www.cnblogs.com/sdfasdf/p/16985952.html

相关文章

  • 【机器学习基础】获取机器学习和深度学习的练习数据
    0.导语初学者学习机器学习和深度学习的时候,经常会找不到练习的数据,本文提供了获取数据的一些方法。一、scikit-learn自带数据集Scikit-learn内置了很多可以用于机器学习的数......
  • 温州大学《深度学习》课程课件(九、目标检测)
    这学期我上的另一门课是本科生的《深度学习》,主要用的是吴恩达老师的《深度学习》视频课的内容。使用教材:吴恩达《深度学习》课程笔记课外参考书:《深度学习》,人民邮电出版社......
  • 温州大学《深度学习》课程课件(一)
    这学期我上的另一门课是本科生的《深度学习》,主要用的是吴恩达老师的《深度学习》视频课的内容。使用教材:吴恩达《深度学习》课程笔记课外参考书:《深度学习》,人民邮电出版社......
  • 温州大学《深度学习》课程课件(三、浅层神经网络)
    这学期我上的另一门课是本科生的《深度学习》,主要用的是吴恩达老师的《深度学习》视频课的内容。使用教材:吴恩达《深度学习》课程笔记课外参考书:《深度学习》,人民邮电出版社......
  • 综述 | 基于深度学习的目标检测算法
    计算机视觉是人工智能的关键领域之一,是一门研究如何使机器“看”的科学。图像目标检测又是计算机视觉的关键任务,主要对图像或视频中的物体进行识别和定位,是AI后续应用的基础......
  • 【深度学习】DNN房价预测
    前言我们使用深度学习网络实现波士顿房价预测,深度学习的目的就是寻找一个合适的函数输出我们想要的结果。深度学习实际上是机器学习领域中一个研究方向,深度学习的目标是让机......
  • 温州大学《深度学习》课程课件(十一、序列模型)
    这学期我上的另一门课是本科生的《深度学习》,主要用的是吴恩达老师的《深度学习》视频课的内容。使用教材:吴恩达《深度学习》课程笔记课外参考书:《深度学习》,人民邮电出版社......
  • 深度学习入门No module named 'common'问题
    这⾥的“common”模块是源代码中作者⾃⼰写的,将下载的源⽂件夹“【源代码】深度学习⼊门:基于Python的理论与实现”改名为book_code,并且将sys.path.append(os.pardir)#......
  • 【机器学习】李宏毅——浅谈机器学习原理+鱼与熊掌兼得的深度学习简述
    如何评判一个训练集的好坏如果我们希望得到一个训练集,并且用该训练集所训练出来的模型,在训练集上的误差和在整个数据空间上的误差相距较小,即写成如下表达式:\[L(h^{train}......
  • 104. 二叉树的最大深度
    给定一个二叉树,找出其最大深度。二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。说明: 叶子节点是指没有子节点的节点。示例:给定二叉树[3,9,20,null,null......