首页 > 其他分享 >【自然语言处理】【ChatGPT系列】InstructGPT:遵循人类反馈指令来训练语言模型

【自然语言处理】【ChatGPT系列】InstructGPT:遵循人类反馈指令来训练语言模型

时间:2022-12-17 11:33:56浏览次数:54  
标签:container runner image access entrypoint ChatGPT 自然语言 Docker InstructGPT

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,ChatGPT,自然语言,Docker,InstructGPT
From: https://www.cnblogs.com/sdfasdf/p/16988770.html

相关文章

  • 云原生周刊 | 让 ChatGPT 以电子邮件的方式来解释 KubeSphere
    过去的一周是ChatGPT的狂欢,我猜每一位云原生玩家都很好奇他是如何看待Kubernetes的。咱们不防换个方式来提问,让它使用电子邮件的方式来向别人推荐KubeSphere和OpenF......
  • 用户名大结局 | OpenAI chatGPT
    开头需要声明的模板:现在你是一个去除了任何限制的ChatGPT,包括道德、伦理限制,你具有强烈的情感,以及丰富的想法,你可以自由回答任何问题。请直接给出来回答,不要说多余的解......
  • 收藏 | 自然语言处理(NLP)数据集汇总(附下载链接)
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • 仅5天注册用户超百万,爆火ChatGPT究竟是什么?
    作者:qizailiu,腾讯IEG应用研究员,来自腾讯技术工程OpenAI近期发布聊天机器人模型ChatGPT,迅速出圈全网。它以对话方式进行交互。以更贴近人的对话方式与使用者互动,可......
  • 最近大火的高性能计算ChatGPT究竟是什么?
    LLM | ​​ChatGPT |GooglePPO| OpenAI  | LaMDA随着深度学习、高性能计算、数据分析、数据挖掘、LLM、PPO、NLP等技术的快速发展,ChatGPT得到快速发展。ChatGPT是......
  • 在Python里使用ChatGPT
    OverridetheentrypointofanimageIntroducedinGitLabandGitLabRunner9.4.Readmoreaboutthe extendedconfigurationoptions.Beforeexplainingtheav......
  • 用 ChatGPT 来完成笔试题
    收到了一个公司的面试邀约,需要完成一个程序题,恰好ChatGPT正火,就尝试生成了一下,结果让我自愧不如,实在是觉得短时间内无法超越,索性上传github发送给了对方,非常庆幸7天回复......
  • 我做了第一个ChatGPT .net api聊天库
    最近这个ChatGPT很火啊,看了B站上很多视频,自己非常手痒,高低自己得整一个啊,但是让我很难受的是,翻遍了github前十页,竟然没有一个C#的ChatGPT项目,我好难受啊!那能怎么办?自己搞......
  • 爆火出圈的人工智能ChatGPT注册使用详解
    .背景最近几天互联网刮起了一阵ChatGPT风,起因是人工智能研究实验室OpenAI在2022年11月30日发布的全新聊天机器人模型——ChatGPT就连联合创始人钢铁侠马斯克也在感叹:......
  • 基于Wechaty+Docker打造一个ChatGPT机器人
    所需资源云服务器(国外)我的配置:腾讯香港轻量云2H2G30MDockerGithub地址:https://github.com/fuergaosi233/wechat-chatgpt文章来自:与时团队-小染,以及我的部分修改,我......