浏览代码

Mise à jour de 'Dockerfile'

penta 4 天之前
父节点
当前提交
d88c8db9cd
共有 1 个文件被更改,包括 6 次插入8 次删除
  1. 6 8
      Dockerfile

+ 6 - 8
Dockerfile

@@ -426,14 +426,12 @@ ENV PATH="/opt/selkies/bin:/usr/local/nvidia/bin:${PATH}" \
 # Install the Selkies wheel from the official stable build image.
 COPY --from=selkies-runtime-builder /opt/selkies /opt/selkies
 
-RUN SELKIES_WEB_ROOT="$( \
-        /opt/selkies/bin/python -c \
-        'import importlib.util; print(next(iter(importlib.util.find_spec("selkies.selkies_web").submodule_search_locations)))'
-    )" \
-    && echo "Selkies web root: ${SELKIES_WEB_ROOT}" \
-    && test -f "${SELKIES_WEB_ROOT}/index.html" \
-    && ln -s "${SELKIES_WEB_ROOT}" /opt/selkies-web \
-    && install -d -o 1000 -g 1000 -m 0755 \
+RUN set -eux; \
+    SELKIES_WEB_ROOT="$(/opt/selkies/bin/python -c 'from pathlib import Path; import selkies; print(Path(selkies.__file__).resolve().parent / "selkies_web")')"; \
+    echo "Selkies web root: ${SELKIES_WEB_ROOT}"; \
+    test -f "${SELKIES_WEB_ROOT}/index.html"; \
+    ln -sfn "${SELKIES_WEB_ROOT}" /opt/selkies-web; \
+    install -d -m 0755 \
         /tmp/nginx \
         /tmp/nginx/client_body \
         /tmp/nginx/proxy