Araik Tamazian commited on
Commit
5345701
·
1 Parent(s): 26af2ea

fixed dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -2
Dockerfile CHANGED
@@ -1,11 +1,31 @@
 
1
  FROM python:3.10-slim
2
 
3
- # Install system dependencies for OpenBLAS
 
 
4
  RUN apt-get update && apt-get install -y \
5
  gcc g++ make cmake git libopenblas-dev \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
- # Install llama-cpp-python from prebuilt wheel (fast)
9
  RUN pip install --no-cache-dir \
10
  https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
11
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.10 explicitly (required for these wheels)
2
  FROM python:3.10-slim
3
 
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
  gcc g++ make cmake git libopenblas-dev \
9
  && rm -rf /var/lib/apt/lists/*
10
 
11
+ # Install llama-cpp-python from prebuilt wheel
12
  RUN pip install --no-cache-dir \
13
  https://huggingface.co/Luigi/llama-cpp-python-wheels-hf-spaces-free-cpu/resolve/main/llama_cpp_python-0.3.22-cp310-cp310-linux_x86_64.whl
14
 
15
+ # Install other dependencies
16
+ COPY requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Copy application code
20
+ COPY . .
21
+
22
+ # Set environment variables
23
+ ENV PYTHONUNBUFFERED=1
24
+ ENV GRADIO_SERVER_NAME=0.0.0.0
25
+
26
+ # Expose Gradio port
27
+ EXPOSE 7860
28
+
29
+ # Run the app
30
+ CMD ["python", "app.py"]
31
+