Module: SkillBench::Constants::Sandbox

Defined in:
lib/skill_bench/constants.rb

Overview

Sandbox Configuration

Constant Summary collapse

DOCKER_IMAGE_NAME =
'evaluator-sandbox'
DOCKER_CONTEXT_RELATIVE =

Relative path of the Docker build context as packaged in the gem.

'lib/skill_bench/execution/docker'

Class Method Summary collapse

Class Method Details

.docker_context_pathString

Absolute path to the Docker build context shipped next to the library code. Resolved from this file so gem installs and git checkouts agree.

Returns:

  • (String)

    absolute path to the docker/ directory



41
42
43
# File 'lib/skill_bench/constants.rb', line 41

def self.docker_context_path
  File.expand_path('execution/docker', __dir__)
end

.image_refString

Versioned image reference used for build and run.

Returns:

  • (String)

    e.g. "evaluator-sandbox:1.2.0"



48
49
50
51
52
# File 'lib/skill_bench/constants.rb', line 48

def self.image_ref
  require_relative 'version' unless defined?(SkillBench::VERSION)

  "#{DOCKER_IMAGE_NAME}:#{SkillBench::VERSION}"
end

.latest_image_refString

Floating latest tag applied alongside the versioned tag on build.

Returns:

  • (String)

    e.g. "evaluator-sandbox:latest"



57
58
59
# File 'lib/skill_bench/constants.rb', line 57

def self.latest_image_ref
  "#{DOCKER_IMAGE_NAME}:latest"
end