Spaces:
Sleeping
Sleeping
Use Python 3.12 (deadsnakes) — optgs needs PEP 695 generic syntax
Browse files- Dockerfile +9 -4
Dockerfile
CHANGED
|
@@ -25,10 +25,15 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
|
| 25 |
# Docker builder has limited RAM; an unbounded build gets OOM-killed.
|
| 26 |
MAX_JOBS=2
|
| 27 |
|
| 28 |
-
#
|
| 29 |
-
#
|
|
|
|
|
|
|
| 30 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
| 32 |
git build-essential ninja-build libglm-dev \
|
| 33 |
libgl1 libglib2.0-0 ca-certificates \
|
| 34 |
&& rm -rf /var/lib/apt/lists/*
|
|
@@ -42,7 +47,7 @@ ENV HOME=/home/user \
|
|
| 42 |
WORKDIR /home/user/app
|
| 43 |
|
| 44 |
# All Python work happens in a venv on PATH (no system-Python writes).
|
| 45 |
-
RUN python3 -m venv /home/user/venv
|
| 46 |
ENV PATH=/home/user/venv/bin:$PATH
|
| 47 |
RUN pip install --upgrade pip setuptools wheel
|
| 48 |
|
|
|
|
| 25 |
# Docker builder has limited RAM; an unbounded build gets OOM-killed.
|
| 26 |
MAX_JOBS=2
|
| 27 |
|
| 28 |
+
# Python 3.12 (via deadsnakes) — optgs uses PEP 695 generic syntax that
|
| 29 |
+
# Ubuntu 22.04's stock Python 3.10 cannot parse. Also: build tools, extension
|
| 30 |
+
# headers (libglm-dev), and the OpenCV runtime libs (libgl1, libglib2.0-0 —
|
| 31 |
+
# optgs's COLMAP loader imports cv2).
|
| 32 |
RUN apt-get update && apt-get install -y --no-install-recommends \
|
| 33 |
+
software-properties-common \
|
| 34 |
+
&& add-apt-repository -y ppa:deadsnakes/ppa \
|
| 35 |
+
&& apt-get update && apt-get install -y --no-install-recommends \
|
| 36 |
+
python3.12 python3.12-dev python3.12-venv \
|
| 37 |
git build-essential ninja-build libglm-dev \
|
| 38 |
libgl1 libglib2.0-0 ca-certificates \
|
| 39 |
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
| 47 |
WORKDIR /home/user/app
|
| 48 |
|
| 49 |
# All Python work happens in a venv on PATH (no system-Python writes).
|
| 50 |
+
RUN python3.12 -m venv /home/user/venv
|
| 51 |
ENV PATH=/home/user/venv/bin:$PATH
|
| 52 |
RUN pip install --upgrade pip setuptools wheel
|
| 53 |
|