cjo93 commited on
Commit
1d0925c
·
verified ·
1 Parent(s): 28c20fd

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 1. Base Image
2
+ FROM python:3.9-slim
3
+
4
+ # 2. Install Essentials
5
+ RUN apt-get update && apt-get install -y \
6
+ build-essential \
7
+ gcc \
8
+ wget \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # 3. Setup Workspace
12
+ WORKDIR /app
13
+
14
+ # 4. Install Dependencies
15
+ COPY requirements.txt .
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # 5. Download Data (GitHub Mirror for reliability)
19
+ RUN mkdir -p /app/ephe && \
20
+ wget -q -O /app/ephe/seas_18.se1 https://raw.githubusercontent.com/chapagain/php-swiss-ephemeris/master/sweph/seas_18.se1 && \
21
+ wget -q -O /app/ephe/semo_18.se1 https://raw.githubusercontent.com/chapagain/php-swiss-ephemeris/master/sweph/semo_18.se1
22
+
23
+ # 6. Copy Code
24
+ COPY . .
25
+
26
+ # 7. Environment
27
+ ENV SE_EPHE_PATH="/app/ephe"
28
+
29
+ # 8. Expose & Launch
30
+ EXPOSE 7860
31
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]