首页 > 其他分享 >sklearn学习笔记10:线性回归

sklearn学习笔记10:线性回归

时间:2022-12-09 15:56:28浏览次数:69  
标签:10 container runner image 笔记 access entrypoint Docker sklearn

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.

标签:10,container,runner,image,笔记,access,entrypoint,Docker,sklearn
From: https://www.cnblogs.com/sdfasdf/p/16969137.html

相关文章

  • ASEMI电磁炉整流桥KBJ2510参数和性能
    编辑-ZASEMI电磁炉整流桥KBJ2510参数和性能怎么样呢?ASEMI采用波峰的GPP大芯片,工艺制造,稳定性高,抗冲击性强。KBJ2510具体参数为:正电流:25A,反向耐压:1000V,反向电流:10uA,正向压......
  • 尚硅谷-尚品汇笔记
    Author:gavin视频地址P35swiper基本使用快速生成轮播图步骤执行npmi-Sswiper@5,添加swiper库,因为6可能有bug,所以用5,引包(css),在main.js中引入impor......
  • Win10 安装 Linux子系统
    1、win+S,搜索PowerShell,右键管理员身份运行 2、输入命令,启用 适用于Linux的Windows子系统 功能dism.exe/online/enable-feature/featurename:Microsoft-Wi......
  • C++笔记(自用)
    《EffectiveC++》条款11在operator=中处理“自我赋值”自我赋值证同测试:if(this==&rhs)return*this;影响并行处理效率记住副本:type*memberO=member;pmember=ne......
  • HTML速查笔记
    一.html结构  <html>    <head>      head内的标签标用户是看不到的,是给浏览器看的,主要定义一些配置      放置head内常用的标签 ......
  • CSS速查笔记
    什么是CSS?控制页面样式的,通常放在HTML的head标签内使用CSS结构选择器{css样式}css样式:{属性:值,属性:值,属性:值}CSS的引入方式有3种:一般都是在html种的head标签内加css......
  • 【win10】Typora+PicGo+node+gitee配置图床
    文章目录​​前言​​​​1.giitee设置​​​​设置私人令牌​​​​2.PicGo设置​​​​PicGo安装及安装环境配置​​​​配置PicGo​​​​设置日志文件​​​​配置git......
  • Win10 TrafficMonitor 缺少mfc140u.dll
    问题描述电脑在Win11上不能运行TrafficMonitor,提示缺少mfc140u.dll,重装Win10后还是出现了同样的问题。解决方案安装XMeters,卸载XMeters,下载TrafficMonitor。解决过程......
  • 猜0-100的数字游戏
    #include<stdio.h>#include<math.h>#include<stdlib.h>#include<time.h>voidmenu(){ printf("*********************************************\n"); printf("*********......
  • Visual AssistX (x64) Version 10.9.2471 Cracked
    任何问题请反馈至邮箱:[email protected](随缘查看邮件)Anyporbs->[email protected]随番茄主版本更新,使用中有任何问题请反馈至邮箱说明1......