guohanghui commited on
Commit
64ba3de
·
verified ·
1 Parent(s): 06ea597

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -7
Dockerfile CHANGED
@@ -5,26 +5,30 @@ RUN apt-get update && apt-get install -y \
5
  build-essential \
6
  gcc \
7
  g++ \
 
 
8
  && rm -rf /var/lib/apt/lists/*
9
 
10
- RUN useradd -m -u 1000 user && python -m pip install --upgrade pip
 
 
 
11
  USER user
12
  ENV PATH="/home/user/.local/bin:$PATH"
13
 
14
  WORKDIR /app
15
 
16
- # Copy requirements and install dependencies first
17
  COPY --chown=user ./requirements.txt requirements.txt
18
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
19
 
20
- # Copy source code
21
  COPY --chown=user . /app
22
 
23
- # Build and install pysph from source
24
  WORKDIR /app/pysph/source
25
- RUN pip install --no-cache-dir -e .
26
 
27
- # Set working directory back to /app
28
  WORKDIR /app
29
 
30
  ENV MCP_TRANSPORT=http
 
5
  build-essential \
6
  gcc \
7
  g++ \
8
+ gfortran \
9
+ libopenblas-dev \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Create user and upgrade pip
13
+ RUN useradd -m -u 1000 user
14
+ RUN python -m pip install --upgrade pip
15
+
16
  USER user
17
  ENV PATH="/home/user/.local/bin:$PATH"
18
 
19
  WORKDIR /app
20
 
21
+ # Copy and install requirements first
22
  COPY --chown=user ./requirements.txt requirements.txt
23
+ RUN pip install --no-cache-dir --user -r requirements.txt
24
 
25
+ # Copy all source code
26
  COPY --chown=user . /app
27
 
28
+ # Build and install pysph from source in user mode
29
  WORKDIR /app/pysph/source
30
+ RUN pip install --no-cache-dir --user -e .
31
 
 
32
  WORKDIR /app
33
 
34
  ENV MCP_TRANSPORT=http