BSJ2004 commited on
Commit
d694cb2
·
verified ·
1 Parent(s): 3b8c078

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -21
Dockerfile CHANGED
@@ -1,31 +1,20 @@
1
  FROM ubuntu:22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
- ENV PORT=7860
 
5
 
6
  RUN apt-get update && apt-get install -y \
7
- git \
8
- build-essential \
9
- python3 \
10
- python3-pip \
11
- wget \
12
  && rm -rf /var/lib/apt/lists/*
13
 
14
- # Clone llama.cpp
15
- RUN git clone https://github.com/ggerganov/llama.cpp.git /llama.cpp
16
- WORKDIR /llama.cpp
17
 
18
- # Build llama.cpp (HF compatible)
19
- RUN make clean && make -j$(nproc)
20
 
21
- # Download GGUF model (SAFE URL)
22
- RUN mkdir -p models && \
23
- wget -O models/llama3.gguf \
24
- https://huggingface.co/TheBloke/Llama-3-8B-Instruct-GGUF/resolve/main/llama-3-8b-instruct.Q4_K_M.gguf
25
 
26
- RUN pip3 install flask
27
-
28
- EXPOSE 7860
29
-
30
- COPY app.py /app.py
31
- CMD ["python3", "/app.py"]
 
1
  FROM ubuntu:22.04
2
 
3
  ENV DEBIAN_FRONTEND=noninteractive
4
+ ENV OLLAMA_HOST=0.0.0.0
5
+ ENV OLLAMA_PORT=11434
6
 
7
  RUN apt-get update && apt-get install -y \
8
+ curl \
9
+ ca-certificates \
 
 
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
+ # Install Ollama
13
+ RUN curl -fsSL https://ollama.com/install.sh | sh
 
14
 
15
+ EXPOSE 11434
 
16
 
17
+ COPY start.sh /start.sh
18
+ RUN chmod +x /start.sh
 
 
19
 
20
+ CMD ["/start.sh"]