euler314 commited on
Commit
e4c9ad4
·
verified ·
1 Parent(s): efb47b3

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +41 -0
Dockerfile ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /code
4
+
5
+ # Install system dependencies required for cartopy and other packages
6
+ RUN apt-get update && apt-get install -y \
7
+ gcc \
8
+ g++ \
9
+ libproj-dev \
10
+ proj-data \
11
+ proj-bin \
12
+ libgeos-dev \
13
+ libgeos-c1v5 \
14
+ git \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # Copy requirements file
18
+ COPY requirements.txt .
19
+
20
+ # Install Python dependencies
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy application code
24
+ COPY . .
25
+
26
+ # Create data directory
27
+ RUN mkdir -p /code/data
28
+
29
+ # Set environment variables
30
+ ENV DATA_PATH=/code/data
31
+
32
+ # Expose port
33
+ EXPOSE 7860
34
+
35
+ # Create entrypoint script
36
+ RUN echo '#!/bin/bash\n\
37
+ python typhoon_analysis.py --data_path=/code/data' > /code/entrypoint.sh && \
38
+ chmod +x /code/entrypoint.sh
39
+
40
+ # Set the entrypoint
41
+ ENTRYPOINT ["/code/entrypoint.sh"]