Fffffd commited on
Commit
71b5b0c
·
verified ·
1 Parent(s): 211542e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +75 -0
Dockerfile ADDED
@@ -0,0 +1,75 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Sistem bağımlılıkları
6
+ RUN apt-get update && apt-get install -y \
7
+ gcc \
8
+ g++ \
9
+ libgeos-dev \
10
+ libproj-dev \
11
+ proj-data \
12
+ proj-bin \
13
+ && rm -rf /var/lib/apt/lists/*
14
+
15
+ # Python bağımlılıkları
16
+ COPY requirements.txt .
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # Uygulama dosyaları
20
+ COPY . .
21
+
22
+ # Frontend dizini oluştur
23
+ RUN mkdir -p frontend
24
+
25
+ # Basit bir frontend oluştur
26
+ RUN echo '<!DOCTYPE html>
27
+ <html>
28
+ <head>
29
+ <title>DrishX - ARGUS Corridor Intelligence</title>
30
+ <meta charset="UTF-8">
31
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
32
+ <script src="https://cdn.tailwindcss.com"></script>
33
+ </head>
34
+ <body>
35
+ <div class="min-h-screen bg-gray-100 flex items-center justify-center">
36
+ <div class="max-w-4xl w-full bg-white shadow-lg rounded-lg p-8">
37
+ <h1 class="text-3xl font-bold text-blue-600 mb-4">🚛 DrishX - ARGUS</h1>
38
+ <p class="text-gray-600 mb-6">Corridor Intelligence System</p>
39
+ <div class="bg-yellow-50 border-l-4 border-yellow-400 p-4 mb-6">
40
+ <p class="text-yellow-700">📡 API Ready</p>
41
+ <p class="text-sm text-yellow-600">POST /api/analyze ile analiz başlatın</p>
42
+ </div>
43
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-4">
44
+ <div class="bg-blue-50 p-4 rounded">
45
+ <h3 class="font-bold text-blue-700">📊 Örnek BBox</h3>
46
+ <pre class="text-xs bg-white p-2 rounded mt-2">[52.25, 10.45, 52.32, 10.55]</pre>
47
+ </div>
48
+ <div class="bg-green-50 p-4 rounded">
49
+ <h3 class="font-bold text-green-700">📡 Endpoints</h3>
50
+ <ul class="text-xs space-y-1 mt-2">
51
+ <li>POST /api/analyze</li>
52
+ <li>GET /api/sites</li>
53
+ <li>GET /api/feed</li>
54
+ <li>GET /api/trends</li>
55
+ </ul>
56
+ </div>
57
+ </div>
58
+ <div class="mt-6 text-center text-sm text-gray-500">
59
+ Built with ❤️ using SentinelHub
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </body>
64
+ </html>' > frontend/index.html
65
+
66
+ # RF model için boş dosya oluştur (gerçek model varsa kopyalanır)
67
+ RUN touch rf_model.pickle
68
+
69
+ # Çalışma ortamı
70
+ ENV DRISHX_DATA_DIR=/app/drishx_data
71
+ ENV RF_MODEL_PATH=/app/rf_model.pickle
72
+
73
+ EXPOSE 8000
74
+
75
+ CMD ["uvicorn", "drishx:app", "--host", "0.0.0.0", "--port", "8000"]