Spaces:
Sleeping
Sleeping
Patch viser version check — HF's HTTP/2 proxy drops the WS subprotocol
Browse files- Dockerfile +9 -0
Dockerfile
CHANGED
|
@@ -59,6 +59,15 @@ RUN pip install torch==2.7.1 torchvision==0.22.1 torchaudio==2.7.1 \
|
|
| 59 |
COPY --chown=user:user requirements.txt .
|
| 60 |
RUN pip install -r requirements.txt
|
| 61 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
# gsplat + nerfacc — built from git against the torch installed above.
|
| 63 |
RUN pip install --no-build-isolation \
|
| 64 |
git+https://github.com/nerfstudio-project/nerfacc \
|
|
|
|
| 59 |
COPY --chown=user:user requirements.txt .
|
| 60 |
RUN pip install -r requirements.txt
|
| 61 |
|
| 62 |
+
# HF serves the Space over HTTP/2, and the WebSocket subprotocol viser uses to
|
| 63 |
+
# announce its client version doesn't survive the proxy — so viser's server
|
| 64 |
+
# reads the client version as "unknown" and rejects the connection (the GUI
|
| 65 |
+
# then hangs on "connecting"). Client and server are the same viser build
|
| 66 |
+
# here, so treat an undeterminable client version as a match, not a reject.
|
| 67 |
+
RUN VISER_INFRA="$(python -c 'import viser.infra._infra as m; print(m.__file__)')" \
|
| 68 |
+
&& sed -i 's/client_version_str = "unknown"/client_version_str = viser.__version__/' "$VISER_INFRA" \
|
| 69 |
+
&& grep -q 'client_version_str = viser.__version__' "$VISER_INFRA"
|
| 70 |
+
|
| 71 |
# gsplat + nerfacc — built from git against the torch installed above.
|
| 72 |
RUN pip install --no-build-isolation \
|
| 73 |
git+https://github.com/nerfstudio-project/nerfacc \
|