首页 > 其他分享 >immich docker-compose.yml下载慢、github下载慢、ghcr.io镜像

immich docker-compose.yml下载慢、github下载慢、ghcr.io镜像

时间:2024-09-13 16:52:28浏览次数:1  
标签:compose -- ghcr DB immich https docker 下载

解决方案:

将:image: ghcr.io/immich-app/immich-server:${IMMICH_VERSION:-release}

改为:image: ghcr.nju.edu.cn/immich-app/immich-server:${IMMICH_VERSION:-release}

使用镜像下载,给出修改后的文件,直接复制然后就可以运行。

点击查看代码
#
# WARNING: Make sure to use the docker-compose.yml of the current release:
#
# https://github.com/immich-app/immich/releases/latest/download/docker-compose.yml
#
# The compose file on main may not be compatible with the latest release.
#

name: immich

services:
  immich-server:
    container_name: immich_server
    image: ghcr.nju.edu.cn/immich-app/immich-server:${IMMICH_VERSION:-release}
    # extends:
    #   file: hwaccel.transcoding.yml
    #   service: cpu # set to one of [nvenc, quicksync, rkmpp, vaapi, vaapi-wsl] for accelerated transcoding
    volumes:
      # Do not edit the next line. If you want to change the media storage location on your system, edit the value of UPLOAD_LOCATION in the .env file
      - ${UPLOAD_LOCATION}:/usr/src/app/upload
      - /etc/localtime:/etc/localtime:ro
    env_file:
      - .env
    ports:
      - 2283:3001
    depends_on:
      - redis
      - database
    restart: always
    healthcheck:
      disable: false

  immich-machine-learning:
    container_name: immich_machine_learning
    # For hardware acceleration, add one of -[armnn, cuda, openvino] to the image tag.
    # Example tag: ${IMMICH_VERSION:-release}-cuda
    image: ghcr.nju.edu.cn/immich-app/immich-machine-learning:${IMMICH_VERSION:-release}
    # extends: # uncomment this section for hardware acceleration - see https://immich.app/docs/features/ml-hardware-acceleration
    #   file: hwaccel.ml.yml
    #   service: cpu # set to one of [armnn, cuda, openvino, openvino-wsl] for accelerated inference - use the `-wsl` version for WSL2 where applicable
    volumes:
      - model-cache:/cache
    env_file:
      - .env
    restart: always
    healthcheck:
      disable: false

  redis:
    container_name: immich_redis
    image: docker.io/redis:6.2-alpine@sha256:2d1463258f2764328496376f5d965f20c6a67f66ea2b06dc42af351f75248792
    healthcheck:
      test: redis-cli ping || exit 1
    restart: always

  database:
    container_name: immich_postgres
    image: docker.io/tensorchord/pgvecto-rs:pg14-v0.2.0@sha256:90724186f0a3517cf6914295b5ab410db9ce23190a2d9d0b9dd6463e3fa298f0
    environment:
      POSTGRES_PASSWORD: ${DB_PASSWORD}
      POSTGRES_USER: ${DB_USERNAME}
      POSTGRES_DB: ${DB_DATABASE_NAME}
      POSTGRES_INITDB_ARGS: '--data-checksums'
    volumes:
      # Do not edit the next line. If you want to change the database storage location on your system, edit the value of DB_DATA_LOCATION in the .env file
      - ${DB_DATA_LOCATION}:/var/lib/postgresql/data
    healthcheck:
      test: pg_isready --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' || exit 1; Chksum="$$(psql --dbname='${DB_DATABASE_NAME}' --username='${DB_USERNAME}' --tuples-only --no-align --command='SELECT COALESCE(SUM(checksum_failures), 0) FROM pg_stat_database')"; echo "checksum failure count is $$Chksum"; [ "$$Chksum" = '0' ] || exit 1
      interval: 5m
      start_interval: 30s
      start_period: 5m
    command: ["postgres", "-c", "shared_preload_libraries=vectors.so", "-c", 'search_path="$$user", public, vectors', "-c", "logging_collector=on", "-c", "max_wal_size=2GB", "-c", "shared_buffers=512MB", "-c", "wal_compression=on"]
    restart: always

volumes:
  model-cache:

分析过程:

失败方法一:添加镜像

下载时很慢。

使用镜像也很慢,

这里我将https://ghcr.nju.edu.cn添加到镜像源也不行。

其实这里如果添加了镜像直接使用命令拉就可以了,会选择最优镜像。但是docker-compose.yml里面直接把路径写死了。

{
  "registry-mirrors": ["https://wheurbwj.mirror.aliyuncs.com",
          "https://dockerproxy.com",
        "https://mirror.baidubce.com",
        "https://docker.m.daocloud.io",
        "https://docker.nju.edu.cn",
        "https://docker.mirrors.sjtug.sjtu.edu.cn",
        "https://ghcr.nju.edu.cn"
  ]
}

最后的效果:下载的很快,基本上跑慢了带宽。

标签:compose,--,ghcr,DB,immich,https,docker,下载
From: https://www.cnblogs.com/dlage/p/18412518

相关文章

  • nvm下载node版本Could not retrieve https://nodejs.org/dist/latest/SHASUMS256.txt.
    1.使用nvm安装node版本的时候报错Couldnotretrievehttps://nodejs.org/dist/latest/SHASUMS256.txt.Get"https://nodejs.org/dist/latest/SHASUMS256.txt":dialtcp104.20.22.46:443:i/otimeout原因:可能是远程连接被关闭的问题,这是由于国内网络限制导致的,解决办法:找到sett......
  • Adobe Premiere Pro(PR)软件下载win/mac安装
    AdobePremierePro(简称AdobePR)的安装步骤可能会因软件版本和系统环境的不同而有所差异,但基本流程大致相同。以下是一个基于较新版本(如AdobePremierePro2024)的详细安装步骤:点击安装包。一、准备工作下载安装包:访问Adobe官方网站或授权的软件下载平台,下载AdobePremier......
  • Linux 之 Nginx 下载/安装
    下载下载地址nginx:download 安装在线安装 配置新的yum源#切换到yum源目录cd/etc/yum.repos.d/#创建yum源文件touchnginx.repo#配置nginx.repo文件内容vimnginx.reponginx.repo文件内容name=nginxrepobaseurl=http://nginx.org/packages/centos/......
  • 工具分享 | 24年最新AWVS/Acunetix Premium V24.8高级版漏洞扫描器(最新版)Windows/Li
    前言AcunetixPremium是一种Web应用程序安全解决方案,用于管理多个网站、Web应用程序和API的安全。集成功能允许您自动化DevOps和问题管理基础架构。AcunetixPremium:全面的Web应用程序安全解决方案Web应用程序对于企业和组织与客户、合作伙伴和员工的联系至关......
  • [2023最新]美少妇Metasploit(MSF)下载安装及使用详解,永久免费使用,环境配置和使用技巧
    模块含义auxiliary:主要包含渗透测试中一些辅助性脚本,这些脚本功能有扫描,嗅探,破解,注入,漏洞挖掘等。encoders:编码工具,用于躲过入侵检测和过滤系统。exploit:主要包括了exp、0day、各种漏洞利用的脚本。主要的攻击代码全在这个目录下,这里边包括的exp的路径的命名规则是:......
  • Adobe Animate(AN)软件下载win/mac安装及快捷键操作
    软件简介AdobeAnimate(简称AN)是Adobe公司推出的一款功能强大的电脑动画制作软件,前身是AdobeFlashProfessionalCC。它不仅能够支持设计游戏、应用程序的交互式矢量动画和位图动画,还兼容HTML5Canvas、WebGL等现代网页技术,为用户提供从2D动画制作到交互式内容设计的全方位解......
  • php毕业设计和课程设计14套——源码+论文完整资源下载
    精选14套基于php的毕业设计源码+论文完整下载大家好,给大家筛选整理一些质量很高的php毕业设计程序+源码+论文全套资源,希望能对大家有所帮助。需要下载开题报告PPT模板及论文答辩PPT模板等的小伙伴,可以进入我的博客主页查看左侧最下面栏目中的自助下载方法哦温馨提示:可按ct......
  • VMware Avi Load Balancer 30.2.2 发布下载,新增功能概览
    VMwareAviLoadBalancer30.2.2-多云负载均衡平台应用交付:多云负载均衡、Web应用防火墙和容器Ingress服务负载均衡平台VMwareAviLoadBalancerVMwareAviLoadBalancer可简化应用交付,并提供多云负载均衡、Web应用防火墙和容器Ingress服务。名称变更VMwareNS......
  • VMware NSX 4.2.0.1 发布下载,新增功能概览
    VMwareNSX4.2.0.1-网络安全虚拟化平台构建具有网络连接和安全性的云智能网络,跨多种云环境支持一致的策略、运维和自动化。VMwareNSX提供了一个敏捷式软件定义基础架构,用来构建云原生应用程序环境。NSX专注于为具有异构端点环境和技术堆栈的新兴应用程序框架和架构提供网......
  • 【逐行注释】自适应Q的AUKF|MATLAB代码|无需下载,可直接复制到MATLAB上面运行
    文章目录自适应UKF逐行注释的说明运行结果完整代码各模块解释自适应UKF自适应无迹卡尔曼滤波(AdaptiveUnscentedKalmanFilter,AUKF)是一种用于状态估计的滤波算法。它是基于无迹卡尔曼滤波(UnscentedKalmanFilter,UKF)的改进算法。自适应无迹卡尔曼滤波在无迹......