LTEngine: Docker compose throws unauthorized error on image: ghcr.io/libretranslate/ltengine:main

Hi!
Super interesting project, though not sure if it’s dead.. hope not!

I’m attempting to try it out, but with docker compose LTEngine/docker-compose.yml at main · LibreTranslate/LTEngine · GitHub

I get:

 ✘ Image ghcr.io/libretranslate/ltengine:main Error Head "https://ghcr.io/v2/libretranslate/ltengine/manifests/main": unauthorized  0.4s
Error response from daemon: Head "https://ghcr.io/v2/libretranslate/ltengine/manifests/main": unauthorized

Hi, welcome :wave: definitely not dead, although I haven’t had much time lately to make improvements.

The error was due to some permissions that changed on GitHub. It should work now if you retry.

1 Like

Awesome! Thank you, the compose downloads now ^^

The github says it supports vulkan as well, but how would I set the compose.yml up?
If I try it with the suggested settings, I get this after trying to up the compose:

Error response from daemon: could not select device driver "nvidia" with capabilities: [[gpu]]

You probably need to build your own docker images to use vulkan.

1 Like

Finally got around trying this!

I installed:

  • libssl-dev
  • pkg-config
  • clang
  • cmake
  • rust was installed
  • build-essential (g++)

I tried:
sudo cargo build --features vulkan --release

But the build failed..

This is the tail end of my trace:

  CMAKE = None
  -- The C compiler identification is GNU 15.2.0
  -- The CXX compiler identification is GNU 15.2.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: /usr/bin/cc - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- llama.cpp version: 0.1.0-dev
  -- Found Git: /usr/bin/git (found version "2.53.0")
  -- The ASM compiler identification is GNU
  -- Found assembler: /usr/bin/cc
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
  -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
  -- Found Threads: TRUE
  -- Warning: ccache not found - consider installing it for faster compilation or disable this warning with GGML_CCACHE=OFF
  -- CMAKE_SYSTEM_PROCESSOR: x86_64
  -- GGML_SYSTEM_ARCH: x86
  -- Found OpenMP_C: -fopenmp (found version "4.5")
  -- Found OpenMP_CXX: -fopenmp (found version "4.5")
  -- Found OpenMP: TRUE (found version "4.5")
  -- Including CPU backend
  -- x86 detected
  -- Adding CPU backend variant ggml-cpu: -msse4.2;-mf16c;-mfma;-mbmi2;-mavx;-mavx2 GGML_SSE42;GGML_F16C;GGML_FMA;GGML_BMI2;GGML_AVX;GGML_AVX2
  -- Configuring incomplete, errors occurred!

  --- stderr
  Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing)
  running: cd "/LTEngine/target/release/build/llama-cpp-sys-2-561a7f71c9185e45/out/build" && CMAKE_PREFIX_PATH="" LC_ALL="C" "cmake" "/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/llama-cpp-sys-2-0.1.155/llama.cpp" "-B" "/LTEngine/target/release/build/llama-cpp-sys-2-561a7f71c9185e45/out/build" "-DLLAMA_BUILD_TESTS=OFF" "-DLLAMA_BUILD_EXAMPLES=OFF" "-DLLAMA_BUILD_SERVER=OFF" "-DLLAMA_BUILD_TOOLS=OFF" "-DLLAMA_BUILD_APP=OFF" "-DLLAMA_BUILD_COMMON=ON" "-DLLAMA_CURL=OFF" "-DCMAKE_BUILD_PARALLEL_LEVEL=4" "-DGGML_NATIVE=OFF" "-DBUILD_SHARED_LIBS=OFF" "-DGGML_VULKAN=ON" "-DGGML_OPENMP=ON" "-DCMAKE_INSTALL_PREFIX=/LTEngine/target/release/build/llama-cpp-sys-2-561a7f71c9185e45/out" "-DCMAKE_C_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -w" "-DCMAKE_C_COMPILER=/usr/bin/cc" "-DCMAKE_CXX_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -w" "-DCMAKE_CXX_COMPILER=/usr/bin/c++" "-DCMAKE_ASM_FLAGS= -ffunction-sections -fdata-sections -fPIC -m64 -w" "-DCMAKE_ASM_COMPILER=/usr/bin/cc" "-DCMAKE_BUILD_TYPE=Release"
  CMAKE_BUILD_TYPE=Release
  fatal: not a git repository (or any of the parent directories): .git
  fatal: not a git repository (or any of the parent directories): .git
  CMake Warning at cmake/license.cmake:18 (message):
    License file
    '/root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/llama-cpp-sys-2-0.1.155/llama.cpp/LICENSE'
    not found
  Call Stack (most recent call first):
    CMakeLists.txt:198 (license_add_file)


  CMake Error at /usr/share/cmake-4.2/Modules/FindPackageHandleStandardArgs.cmake:290 (message):
    Could NOT find Vulkan (missing: Vulkan_LIBRARY Vulkan_INCLUDE_DIR glslc)
    (found version "")
  Call Stack (most recent call first):
    /usr/share/cmake-4.2/Modules/FindPackageHandleStandardArgs.cmake:654 (_FPHSA_FAILURE_MESSAGE)
    /usr/share/cmake-4.2/Modules/FindVulkan.cmake:694 (find_package_handle_standard_args)
    ggml/src/ggml-vulkan/CMakeLists.txt:9 (find_package)

It looks like some source code failed to download during the build… perhaps GitHub was having network issues (that’s becoming more common these days, so it’s not a far fetched possibility).

Ok! I just tried again a few times, the result is now:

...
  cargo:rustc-link-lib=stdc++
  cargo:rustc-link-lib=vulkan
  CMAKE_TOOLCHAIN_FILE_x86_64-unknown-linux-gnu = None
  CMAKE_TOOLCHAIN_FILE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_TOOLCHAIN_FILE = None
  CMAKE_TOOLCHAIN_FILE = None
  CMAKE_GENERATOR_x86_64-unknown-linux-gnu = None
  CMAKE_GENERATOR_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_GENERATOR = None
  CMAKE_GENERATOR = None
  CMAKE_PREFIX_PATH_x86_64-unknown-linux-gnu = None
  CMAKE_PREFIX_PATH_x86_64_unknown_linux_gnu = None
  HOST_CMAKE_PREFIX_PATH = None
  CMAKE_PREFIX_PATH = None
  CMAKE_x86_64-unknown-linux-gnu = None
  CMAKE_x86_64_unknown_linux_gnu = None
  HOST_CMAKE = None
  CMAKE = None
  CMake project was already configured. Skipping configuration step.

  --- stderr
  Failed to run rustfmt: No such file or directory (os error 2) (non-fatal, continuing)
  running: cd "/my/dir/LTEngine/target/release/build/llama-cpp-sys-2-561a7f71c9185e45/out/build" && LC_ALL="C" "cmake" "--build" "/my/dir/LTEngine/target/release/build/llama-cpp-sys-2-561a7f71c9185e45/out/build" "--target" "install" "--config" "Release" "--parallel" "4"
  gmake: Makefile: No such file or directory
  gmake: *** No rule to make target 'Makefile'.  Stop.

  thread 'main' (217260) panicked at /root/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/cmake-0.1.58/src/lib.rs:1132:5:

  command did not execute successfully, got: exit status: 2

  build script failed, must exit now
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
warning: build failed, waiting for other jobs to finish...