forked from matthewaltenburg/Deepthink
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
51 lines (42 loc) · 1.25 KB
/
Dockerfile
File metadata and controls
51 lines (42 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM nvidia/cuda:12.2.2-base-ubuntu22.04
# Set environment variables
ENV NVIDIA_VISIBLE_DEVICES=all \
NVIDIA_DRIVER_CAPABILITIES=compute,utility \
OLLAMA_MODELS=/root/.ollama
VOLUME $OLLAMA_MODELS
# Install basic dependencies
RUN apt-get update && apt-get install -y \
curl \
sudo \
python3 \
python3-pip \
git \
wget \
supervisor \
&& rm -rf /var/lib/apt/lists/*
# Install Ollama
RUN curl -fsSL https://ollama.com/install.sh | sh
# Deepthink App
WORKDIR /app
COPY container/app/ /app/
# Install Python dependencies
COPY container/requirements.txt .
RUN pip3 install --cache-dir=/root/.cache/pip -r requirements.txt && rm requirements.txt
# Supervisor configuration
COPY container/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
RUN mkdir -p /var/log/supervisor && \
mkdir -p /var/run && \
chmod 755 /var/log/supervisor /var/run && \
chown -R root:root /var/log/supervisor /var/run
# Expose ports
# Gradio
EXPOSE 7860
# Ollama
EXPOSE 11434
# Langchain
EXPOSE 8000
# Health check for Gradio app
HEALTHCHECK --interval=30s --timeout=5s --start-period=60s \
CMD curl -f http://localhost:11434/api/tags || exit 1
# Entry point
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]