Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3kdownloads
sharp.cjs175 linesDownload Raw Back to dist
1/*!2  Copyright 2013 Lovell Fuller and others.3  SPDX-License-Identifier: Apache-2.04*/5 6// Inspects the runtime environment and exports the relevant sharp.node binary7 8 9const { familySync, versionSync } = require("detect-libc");10 11const libvips = require("./libvips.cjs");12const pkg = require('../package.json');13 14 15const { version } = pkg;16 17const { runtimePlatformArch, isUnsupportedNodeRuntime, prebuiltPlatforms, minimumLibvipsVersion } = libvips;18const runtimePlatform = runtimePlatformArch();19 20/* node:coverage disable */21 22let sharp;23const errors = [];24try {25  sharp = require(`../src/build/Release/sharp-${runtimePlatform}-${version}.node`);26} catch (err) {27  errors.push(err);28}29if (!sharp) {30  try {31    sharp = require(`../src/build/Release/sharp-wasm32-${version}.node`);32  } catch (err) {33    errors.push(err);34  }35}36if (!sharp) {37  try {38    switch (runtimePlatform) {39      case "darwin-arm64":40        sharp = require("@img/sharp-darwin-arm64/sharp.node");41        break;42      case "darwin-x64":43        sharp = require("@img/sharp-darwin-x64/sharp.node");44        break;45      case "linux-arm":46        sharp = require("@img/sharp-linux-arm/sharp.node");47        break;48      case "linux-arm64":49        sharp = require("@img/sharp-linux-arm64/sharp.node");50        break;51      case "linux-ppc64":52        sharp = require("@img/sharp-linux-ppc64/sharp.node");53        break;54      case "linux-riscv64":55        sharp = require("@img/sharp-linux-riscv64/sharp.node");56        break;57      case "linux-s390x":58        sharp = require("@img/sharp-linux-s390x/sharp.node");59        break;60      case "linux-x64":61        sharp = require("@img/sharp-linux-x64/sharp.node");62        break;63      case "linuxmusl-arm64":64        sharp = require("@img/sharp-linuxmusl-arm64/sharp.node");65        break;66      case "linuxmusl-x64":67        sharp = require("@img/sharp-linuxmusl-x64/sharp.node");68        break;69      case "win32-arm64":70        sharp = require("@img/sharp-win32-arm64/sharp.node");71        break;72      case "win32-ia32":73        sharp = require("@img/sharp-win32-ia32/sharp.node");74        break;75      case "win32-x64":76        sharp = require("@img/sharp-win32-x64/sharp.node");77        break;78      case "freebsd-arm64":79      case "freebsd-x64":80        sharp = require("@img/sharp-freebsd-wasm32/sharp.node");81        break;82      case "linux-wasm32":83        sharp = require("@img/sharp-webcontainers-wasm32/sharp.node");84        break;85    }86    if (sharp && ["linux-x64", "linuxmusl-x64"].includes(runtimePlatform) && !sharp._isUsingX64V2()) {87      const err = new Error("Prebuilt binaries for Linux x64 require v2 microarchitecture");88      err.code = "Unsupported CPU";89      errors.push(err);90      sharp = null;91    }92    if (sharp && process.versions.electron && runtimePlatform.startsWith("linux")) {93      process.emitWarning(94        "Binaries provided by Electron for use on Linux may be incompatible with sharp - see https://sharp.pixelplumbing.com/install#electron-and-linux",95        { code: "SharpElectronLinux" }96      );97    }98  } catch (err) {99    errors.push(err);100  }101}102if (!sharp) {103  try {104    sharp = require("@img/sharp-wasm32/sharp.node");105  } catch (err) {106    errors.push(err);107  }108}109 110if (!sharp) {111  const [isLinux, isMacOs, isWindows] = ["linux", "darwin", "win32"].map((os) => runtimePlatform.startsWith(os));112 113  const help = [`Could not load the "sharp" module using the ${runtimePlatform} runtime`];114  errors.forEach((err) => {115    if (!err.code.endsWith("MODULE_NOT_FOUND")) {116      help.push(`${err.code}: ${err.message}`);117    }118  });119  const messages = errors.map((err) => err.message).join(" ");120  help.push("Possible solutions:");121  // Common error messages122  if (isUnsupportedNodeRuntime()) {123    const { found, expected } = isUnsupportedNodeRuntime();124    help.push("- Please upgrade Node.js:", `    Found ${found}`, `    Requires ${expected}`);125  } else if (prebuiltPlatforms.includes(runtimePlatform)) {126    const [os, cpu] = runtimePlatform.split("-");127    const libc = os.endsWith("musl") ? " --libc=musl" : "";128    help.push(129      "- Ensure optional dependencies can be installed:",130      "    npm install --include=optional sharp",131      "- Ensure your package manager supports multi-platform installation:",132      "    See https://sharp.pixelplumbing.com/install#cross-platform",133      "- Add platform-specific dependencies:",134      `    npm install --os=${os.replace("musl", "")}${libc} --cpu=${cpu} sharp`,135    );136  } else {137    help.push(138      `- Manually install libvips >= ${minimumLibvipsVersion}`,139      "    See https://sharp.pixelplumbing.com/install#building-from-source",140      "- Add WebAssembly-based dependencies:",141      "    npm install sharp @img/sharp-wasm32",142    );143  }144  if (isLinux && /(symbol not found|CXXABI_)/i.test(messages)) {145    try {146      const { config } = require(`@img/sharp-libvips-${runtimePlatform}/package`);147      const libcFound = `${familySync()} ${versionSync()}`;148      const libcRequires = `${config.musl ? "musl" : "glibc"} ${config.musl || config.glibc}`;149      help.push("- Update your OS:", `    Found ${libcFound}`, `    Requires ${libcRequires}`);150    } catch (_errEngines) {}151  }152  if (isLinux && /\/snap\/core[0-9]{2}/.test(messages)) {153    help.push("- Remove the Node.js Snap, which does not support native modules", "    snap remove node");154  }155  if (isMacOs && /Incompatible library version/.test(messages)) {156    help.push("- Update Homebrew:", "    brew update && brew upgrade vips");157  }158  if (errors.some((err) => err.code === "ERR_DLOPEN_DISABLED")) {159    help.push("- Run Node.js without using the --no-addons flag");160  }161  // Link to installation docs162  if (isWindows && /The specified procedure could not be found/.test(messages)) {163    help.push(164      "- Using the canvas package on Windows?",165      "    See https://sharp.pixelplumbing.com/install#canvas-and-windows",166      "- Check for outdated versions of sharp in the dependency tree:",167      "    npm ls sharp",168    );169  }170  help.push("- Consult the installation documentation:", "    See https://sharp.pixelplumbing.com/install");171  throw new Error(help.join("\n"));172}173 174module.exports = sharp;175 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai