CyberCoder225 commited on
Commit
c01d256
·
verified ·
1 Parent(s): df49e1d

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +14 -14
Dockerfile CHANGED
@@ -1,24 +1,24 @@
1
- FROM python:3.10-alpine
 
2
 
3
- # Install build tools + math libraries
4
- RUN apk add --no-cache \
5
- build-base \
6
- libgomp \
7
- libstdc++ \
8
- cmake \
9
- python3-dev \
10
- libffi-dev \
11
- git
12
 
13
- RUN adduser -D -u 1000 user
14
  USER user
15
  ENV HOME=/home/user \
16
  PATH=/home/user/.local/bin:$PATH
17
  WORKDIR $HOME/app
18
 
19
- # Install requirements one by one to avoid errors
20
- COPY --chown=user requirements.txt .
21
- RUN pip install --no-cache-dir -r requirements.txt --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
 
 
 
 
22
 
23
  COPY --chown=user . $HOME/app
24
 
 
1
+ # Use Python 3.10 on Debian (Standard for pre-built wheels)
2
+ FROM python:3.10-slim
3
 
4
+ # Install ONLY the runtime math library (libgomp1)
5
+ RUN apt-get update && apt-get install -y \
6
+ libgomp1 \
7
+ && rm -rf /var/lib/apt/lists/*
 
 
 
 
 
8
 
9
+ RUN useradd -m -u 1000 user
10
  USER user
11
  ENV HOME=/home/user \
12
  PATH=/home/user/.local/bin:$PATH
13
  WORKDIR $HOME/app
14
 
15
+ # Force-install the PRE-BUILT wheel so we DON'T "Build Wheel"
16
+ # We use the 'manylinux' version which is a universal binary
17
+ RUN pip install --no-cache-dir \
18
+ flask \
19
+ flask-cors \
20
+ huggingface-hub \
21
+ llama-cpp-python --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
22
 
23
  COPY --chown=user . $HOME/app
24