tomo14151 commited on
Commit
7a17607
·
verified ·
1 Parent(s): 2ed823a

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +29 -0
Dockerfile ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ curl \
6
+ procps \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Install Ollama
10
+ RUN curl -fsSL https://ollama.ai/install.sh | sh
11
+
12
+ # Set working directory
13
+ WORKDIR /app
14
+
15
+ # Install Python dependencies
16
+ RUN pip install fastapi uvicorn requests pydantic
17
+
18
+ # Copy application files
19
+ COPY . .
20
+
21
+ # Expose port
22
+ EXPOSE 7860
23
+
24
+ # Health check
25
+ HEALTHCHECK --interval=30s --timeout=10s --start-period=5m --retries=3 \
26
+ CMD curl -f http://localhost:7860/health || exit 1
27
+
28
+ # Start application
29
+ CMD ["python", "app.py"]