jacky3102 commited on
Commit
076adac
·
verified ·
1 Parent(s): cbb84b7

Dockerfile: python:3.10-slim base

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -17
Dockerfile CHANGED
@@ -1,38 +1,30 @@
1
- FROM python:3.11
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PIP_NO_CACHE_DIR=1
5
 
6
- # 显式源 + 调试输出
7
- RUN set -ex \
8
- && echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list \
9
  && echo "deb http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list \
10
- && echo "deb http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list \
11
- && apt-get update \
12
- && apt-get install -y --no-install-recommends \
13
  wget xz-utils ca-certificates \
14
  libxi6 libxext6 libxrender1 libxfixes3 libxxf86vm1 \
15
  libxkbcommon0 libsm6 libgl1 libglu1-mesa \
16
- && rm -rf /var/lib/apt/lists/* \
17
- && echo "=== APT packages installed ==="
18
 
19
- # Blender 4.2.9 LTS
20
  ARG BLENDER_VERSION=4.2.9
21
- RUN set -ex \
22
- && wget -q "https://download.blender.org/release/Blender4.2/blender-${BLENDER_VERSION}-linux-x64.tar.xz" -O /tmp/blender.tar.xz \
23
  && tar -xf /tmp/blender.tar.xz -C /opt \
24
  && mv /opt/blender-${BLENDER_VERSION}-linux-x64 /opt/blender \
25
- && rm /tmp/blender.tar.xz \
26
- && /opt/blender/blender --version \
27
- && echo "=== Blender installed ==="
28
-
29
  ENV PATH="/opt/blender:${PATH}"
30
 
31
  RUN useradd -m -u 1000 appuser
32
  WORKDIR /app
33
 
34
  COPY requirements.txt .
35
- RUN set -ex && pip install -r requirements.txt && echo "=== Python deps installed ==="
36
 
37
  COPY app.py worker.py ./
38
 
 
1
+ FROM python:3.10-slim
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
  ENV PIP_NO_CACHE_DIR=1
5
 
6
+ RUN echo "deb http://deb.debian.org/debian bookworm main" > /etc/apt/sources.list \
 
 
7
  && echo "deb http://deb.debian.org/debian-security bookworm-security main" >> /etc/apt/sources.list \
8
+ && echo "deb http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list
9
+
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
  wget xz-utils ca-certificates \
12
  libxi6 libxext6 libxrender1 libxfixes3 libxxf86vm1 \
13
  libxkbcommon0 libsm6 libgl1 libglu1-mesa \
14
+ && rm -rf /var/lib/apt/lists/*
 
15
 
 
16
  ARG BLENDER_VERSION=4.2.9
17
+ RUN wget -q "https://download.blender.org/release/Blender4.2/blender-${BLENDER_VERSION}-linux-x64.tar.xz" -O /tmp/blender.tar.xz \
 
18
  && tar -xf /tmp/blender.tar.xz -C /opt \
19
  && mv /opt/blender-${BLENDER_VERSION}-linux-x64 /opt/blender \
20
+ && rm /tmp/blender.tar.xz
 
 
 
21
  ENV PATH="/opt/blender:${PATH}"
22
 
23
  RUN useradd -m -u 1000 appuser
24
  WORKDIR /app
25
 
26
  COPY requirements.txt .
27
+ RUN pip install -r requirements.txt
28
 
29
  COPY app.py worker.py ./
30