<commit_before>package server

import (
	"github.com/mrunalp/ocid/oci"
)

const (
	runtimeAPIVersion = "v1alpha1"
)

// Server implements the RuntimeService and ImageService
type Server struct {
	runtime    *oci.Runtime
	sandboxDir string
	state      *serverState
}

// New creates a new Server with options provided
func New(runtimePath, sandboxDir, containerDir string) (*Server, error) {
	r, err := oci.New(runtimePath, containerDir)
	if err != nil {
		return nil, err<commit_msg>Setup the server as subreaper for child processes<commit_after>package server

import (
	"fmt"

	"github.com/mrunalp/ocid/oci"
	"github.com/mrunalp/ocid/utils"
)

const (
	runtimeAPIVersion = "v1alpha1"
)

// Server implements the RuntimeService and ImageService
type Server struct {
	runtime    *oci.Runtime
	sandboxDir string
	state      *serverState
}

// New creates a new Server with options provided
func New(runtimePath, sandboxDir, containerDir string) (*Server, error) {
	// TODO: This will go away later when we have wrapper process or systemd acting as
	// subreaper.
	if err := utils.SetSubreaper(1); err != nil {
		return nil, fmt.Errorf("failed to set server as subreaper: %v", err)
	}

	r, err := oci.New(runtimePath, containerDir)
	if err != nil {
		return nil, err
{'fraction_non_alphanumeric': 0.09731012658227849, 'fraction_numerical': 0.003955696202531646, 'mean_word_length': 4.100806451612903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1628655', 'n_tokens_mistral': 414, 'n_tokens_neox': 409, 'n_words': 133}