Iris314 commited on
Commit
38fc0bd
·
verified ·
1 Parent(s): bb8dbb2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -10
Dockerfile CHANGED
@@ -5,7 +5,6 @@ WORKDIR /app
5
  ENV PYTHONUNBUFFERED=1 \
6
  PYTHONDONTWRITEBYTECODE=1
7
 
8
- # 安装系统依赖
9
  RUN apt-get update && apt-get install -y --no-install-recommends \
10
  build-essential \
11
  git \
@@ -24,22 +23,26 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
24
  && apt-get clean \
25
  && rm -rf /var/lib/apt/lists/*
26
 
27
- # 安装Python和gradio
28
- RUN conda install -c conda-forge \
29
- python=3.10 \
30
- gradio \
31
- -y && \
32
  conda clean --all -y
33
 
34
- # 从PyPI安装cadquery-ocp
35
- RUN pip install --no-cache-dir cadquery-ocp==7.8.1.1.post1
 
 
 
 
 
 
 
36
 
37
  COPY . /app/
38
 
39
  EXPOSE 7860
40
 
41
  # 验证安装
42
- RUN python -c "import sys; print('Python:', sys.version)" && \
43
- python -c "from OCP.STEPControl import STEPControl_Reader; print('OCP installed successfully')"
 
44
 
45
  CMD ["python", "/app/app.py"]
 
5
  ENV PYTHONUNBUFFERED=1 \
6
  PYTHONDONTWRITEBYTECODE=1
7
 
 
8
  RUN apt-get update && apt-get install -y --no-install-recommends \
9
  build-essential \
10
  git \
 
23
  && apt-get clean \
24
  && rm -rf /var/lib/apt/lists/*
25
 
26
+ RUN conda install -c conda-forge python=3.10 gradio=5.0.0 -y && \
 
 
 
 
27
  conda clean --all -y
28
 
29
+ RUN pip install --no-cache-dir \
30
+ cadquery-ocp==7.8.1.1.post1 \
31
+ gmsh==4.15.0 \
32
+ numpy==2.2.6 \
33
+ pandas==2.3.3 \
34
+ scikit-learn==1.7.2 \
35
+ torch==2.9.1 \
36
+ matplotlib==3.10.7 \
37
+ joblib==1.5.2
38
 
39
  COPY . /app/
40
 
41
  EXPOSE 7860
42
 
43
  # 验证安装
44
+ RUN python -c "from OCP.STEPControl import STEPControl_Reader; print('OCP OK')" && \
45
+ python -c "import gmsh; print('gmsh OK')" && \
46
+ python -c "import torch; print('PyTorch OK')"
47
 
48
  CMD ["python", "/app/app.py"]