소스 검색

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