Luigi commited on
Commit
a2b6da7
·
1 Parent(s): 35a0c7d

switch back to gradio sdk

Browse files
Files changed (3) hide show
  1. Dockerfile +0 -49
  2. packages.txt +4 -0
  3. requirements.txt +2 -2
Dockerfile DELETED
@@ -1,49 +0,0 @@
1
- # 1. Base image
2
- FROM python:3.10-slim
3
-
4
- # 2. Noninteractive + timezone
5
- ENV DEBIAN_FRONTEND=noninteractive \
6
- TZ=Etc/UTC \
7
- XDG_CACHE_HOME=/tmp/.cache \
8
- HF_HOME=/tmp/.cache/huggingface
9
-
10
- # 3. Use bash strict mode
11
- SHELL ["/bin/bash", "-euxo", "pipefail", "-c"]
12
-
13
- # 4. Install system deps and set timezone
14
- RUN apt-get update \
15
- && apt-get install -y --no-install-recommends \
16
- tzdata \
17
- git \
18
- pkg-config \
19
- cmake \
20
- build-essential \
21
- python3-opencv \
22
- build-essential \
23
- cmake \
24
- libopenblas-dev \
25
- && ln -sf /usr/share/zoneinfo/$TZ /etc/localtime \
26
- && echo $TZ > /etc/timezone \
27
- && rm -rf /var/lib/apt/lists/*
28
-
29
- # 5. Prepare cache dirs
30
- RUN mkdir -p "$XDG_CACHE_HOME" "$HF_HOME" \
31
- && chmod -R a+rwX "$XDG_CACHE_HOME" "$HF_HOME"
32
-
33
- # 6. Build llama-cpp-python with OpenBLAS
34
- RUN git clone --depth 1 --recurse-submodules \
35
- https://github.com/abetlen/llama-cpp-python.git /tmp/llama-cpp-python \
36
- && cd /tmp/llama-cpp-python \
37
- && CMAKE_ARGS="-DGGML_BLAS=ON -DGGML_BLAS_VENDOR=OpenBLAS" pip install . \
38
- && rm -rf /tmp/llama-cpp-python
39
-
40
- # 7. (Optional) Your other Python deps
41
- COPY requirements.txt .
42
- RUN pip install --no-cache-dir -r requirements.txt
43
-
44
- # 8. Copy app code
45
- COPY . .
46
-
47
- # 9. Expose & run
48
- EXPOSE 7860
49
- CMD ["python3", "app.py"]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
packages.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ python3-opencv
2
+ build-essential
3
+ cmake
4
+ libopenblas-dev
requirements.txt CHANGED
@@ -1,6 +1,6 @@
1
  gradio>=5.0
2
  opencv-python
3
  pillow
4
- # llama-cpp-python
5
  huggingface-hub
6
- termcolor
 
1
  gradio>=5.0
2
  opencv-python
3
  pillow
4
+ llama-cpp-python -C cmake.args="-DGGML_BLAS=ON;-DGGML_BLAS_VENDOR=OpenBLAS"
5
  huggingface-hub
6
+ termcolor