OrbitMC commited on
Commit
6cf0909
·
verified ·
1 Parent(s): 7549ba3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -20
Dockerfile CHANGED
@@ -1,28 +1,26 @@
1
- FROM ubuntu:22.04
2
 
3
- # Install system dependencies
4
- RUN apt-get update && \
5
- apt-get install -y \
6
  build-essential \
7
- python3-pip \
8
- cmake \
9
  git \
10
- curl && \
11
- rm -rf /var/lib/apt/lists/*
12
 
13
- # Set environment variables for faster downloads
14
- ENV HF_HUB_ENABLE_HF_TRANSFER=1
 
 
 
 
 
 
 
 
15
 
16
- # Install Python dependencies
17
- # llama-cpp-python will be compiled during install
18
- RUN pip3 install --upgrade pip && \
19
- pip3 install llama-cpp-python huggingface-hub[hf_transfer] gradio duckduckgo-search
20
 
21
- # Copy the application code
22
- COPY app.py /app.py
23
-
24
- # Expose the Gradio port
25
  EXPOSE 7860
26
 
27
- # Run the script directly
28
- CMD ["python3", "/app.py"]
 
1
+ FROM python:3.10-slim
2
 
3
+ # Install system dependencies for build-essential (needed for some python libs)
4
+ RUN apt-get update && apt-get install -y \
 
5
  build-essential \
 
 
6
  git \
7
+ && rm -rf /var/lib/apt/lists/*
 
8
 
9
+ # Install Hugging Face stack and Search
10
+ # bitsandbytes + accelerate allows running the model on lower RAM
11
+ RUN pip install --no-cache-dir \
12
+ torch \
13
+ transformers \
14
+ accelerate \
15
+ bitsandbytes \
16
+ gradio \
17
+ duckduckgo-search \
18
+ sentencepiece
19
 
20
+ WORKDIR /app
21
+ COPY app.py .
 
 
22
 
23
+ # Expose Gradio port
 
 
 
24
  EXPOSE 7860
25
 
26
+ CMD ["python", "app.py"]