首页 > 其他分享 >NLP学习笔记(二) LSTM基本介绍

NLP学习笔记(二) LSTM基本介绍

时间:2022-12-16 09:33:06浏览次数:64  
标签:NLP container runner image 笔记 access entrypoint LSTM 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.

标签:NLP,container,runner,image,笔记,access,entrypoint,LSTM,Docker
From: https://www.cnblogs.com/sdfasdf/p/16986528.html

相关文章

  • 【《硬件架构的艺术》读书笔记】06 流水线的艺术(1)
    6.1介绍流水线通过在较长的组合逻辑路径中插入寄存器降低了组合逻辑延迟,增加了时钟频率并提高了性能。 图中分别为插入流水线前后的逻辑。长路径插入寄存器后最大时钟......
  • FreeSWITCH学习笔记:应用程序(APP)
    本文更新于2022-12-15,使用FreeSWITCH1.10.7。官方文档见:https://freeswitch.org/confluence/display/FREESWITCH/mod_dptools说明:下文中,部分大写为自定义变量,根据实际情......
  • 深度学习笔记第一门课第二周:神经网络的编程基础(下)
    本文是吴恩达老师的深度学习课程[1]笔记部分。作者:黄海广[2]主要编写人员:黄海广、林兴木(第四所有底稿,第五课第一二周,第三周前三节)、祝彦森:(第三课所有底稿)、贺志尧(第五课第......
  • c语言入门这一篇就够了-学习笔记
    c语言入门C语言一经出现就以其功能丰富、表达能力强、灵活方便、应用面广等特点迅速在全世界普及和推广。C语言不但执行效率高而且可移植性好,可以用来开发应用软件、驱动、......
  • Java-数组4-笔记
    1.数组的作用就是一个容器,用于在程序中存储一批同种类型的数据2.数组的定义静态初始化数组格式1数据类型[]数组名称=new数据类型[]{元素1,元素2,元素3,....}格式2数据类型[......
  • 笔记-C语言中static作用
    C语言中,static关键词可以用来修饰变量和函数,用static关键词修饰的变量成为静态变量。static关键词的作用主要包括3个方面:1.隐藏一个项目中往往包括多个.c文件,所有未加st......
  • 程序设计模式急救笔记
    打完游戏发现考试内容一点没看,紧急抢救,精神状态不甚正常,慎读。例子有的不是很好,为了考试的时候抄个UML图方便罢了。0.UML图1.关联关系类A用到了类B,A->B类A用到了类B......
  • Isolation forest阅读笔记
    IForest所基于的假设异常是由较少实例组成的少数派它们拥有与正常实例差别较大的属性换句话说,异常是少而不同的(fewanddifferent),这使得它们比正常的点更容易被孤立......
  • T-SQL语言基础 - 第一章笔记
    sql逻辑顺序1. FROM 指定要查询的表名,以及对这些表进行操作的表运算符2.WHERE指定一个谓词或逻辑表达式,从而过滤由FROM阶段返回的行。对查询性能有重要的影响,在......
  • c/c++学习过程中的知识点记录:学习笔记(一)
    学习的过程就是一个一个小的知识点累加的过程,学会一个就在此记录一个。时间长了就知道的就多了,还可以用来温习自己学过的知识。一、return语句不可返回栈指针(指向栈内存的......