guohanghui commited on
Commit
0a4014e
·
verified ·
1 Parent(s): 36ed503

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -1
Dockerfile CHANGED
@@ -1,5 +1,14 @@
1
  FROM python:3.10
2
 
 
 
 
 
 
 
 
 
 
3
  RUN useradd -m -u 1000 user && python -m pip install --upgrade pip
4
  USER user
5
  ENV PATH="/home/user/.local/bin:$PATH"
@@ -7,7 +16,12 @@ ENV PATH="/home/user/.local/bin:$PATH"
7
  WORKDIR /app
8
 
9
  COPY --chown=user ./requirements.txt requirements.txt
10
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
 
 
 
 
 
11
 
12
  COPY --chown=user . /app
13
  ENV MCP_TRANSPORT=http
 
1
  FROM python:3.10
2
 
3
+ # Install system dependencies for compilation
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ gcc \
7
+ g++ \
8
+ gfortran \
9
+ swig \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
  RUN useradd -m -u 1000 user && python -m pip install --upgrade pip
13
  USER user
14
  ENV PATH="/home/user/.local/bin:$PATH"
 
16
  WORKDIR /app
17
 
18
  COPY --chown=user ./requirements.txt requirements.txt
19
+
20
+ # Install build dependencies first with compatible versions
21
+ RUN pip install --no-cache-dir "setuptools<60" "numpy<1.24" "Cython<3.0"
22
+
23
+ # Install remaining requirements, preferring binary wheels
24
+ RUN pip install --no-cache-dir --prefer-binary -r requirements.txt
25
 
26
  COPY --chown=user . /app
27
  ENV MCP_TRANSPORT=http