abhiraj12 commited on
Commit
6a2bbff
·
1 Parent(s): 4eaff40

Fix Python 3.14 compatibility: update pandas to flexible version and add Fly.io config with Python 3.12

Browse files
Files changed (3) hide show
  1. Dockerfile +3 -11
  2. fly.toml +22 -0
  3. requirements.txt +3 -3
Dockerfile CHANGED
@@ -1,26 +1,18 @@
1
- FROM python:3.11-slim
2
 
3
- # Set working directory
4
  WORKDIR /app
5
 
6
- # Install system dependencies
7
  RUN apt-get update && apt-get install -y \
8
- gcc \
9
- g++ \
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
- # Copy requirements and install Python dependencies
13
  COPY requirements.txt .
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
- # Copy application code
17
  COPY . .
18
 
19
- # Create necessary directories
20
- RUN mkdir -p backend/runs backend/tmp frontend/web
21
 
22
- # Expose port
23
  EXPOSE 8000
24
 
25
- # Run the application
26
  CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
 
1
+ FROM python:3.12-slim
2
 
 
3
  WORKDIR /app
4
 
 
5
  RUN apt-get update && apt-get install -y \
6
+ gcc g++ \
 
7
  && rm -rf /var/lib/apt/lists/*
8
 
 
9
  COPY requirements.txt .
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
 
12
  COPY . .
13
 
14
+ RUN mkdir -p backend/runs backend/tmp
 
15
 
 
16
  EXPOSE 8000
17
 
 
18
  CMD ["uvicorn", "backend.main:app", "--host", "0.0.0.0", "--port", "8000"]
fly.toml ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # fly.toml app configuration file
2
+ app = "automl-studio"
3
+ primary_region = "lax"
4
+
5
+ [build]
6
+ dockerfile = "Dockerfile"
7
+
8
+ [env]
9
+ PYTHONUNBUFFERED = "true"
10
+
11
+ [http_service]
12
+ internal_port = 8000
13
+ force_https = true
14
+ auto_stop_machines = true
15
+ auto_start_machines = true
16
+ min_machines_running = 1
17
+ processes = ["app"]
18
+
19
+ [[vm]]
20
+ cpu_kind = "shared"
21
+ cpus = 1
22
+ memory_mb = 512
requirements.txt CHANGED
@@ -4,9 +4,9 @@ uvicorn[standard]==0.30.0
4
  pydantic==2.7.1
5
 
6
  # ── Data Processing ─────────────────────────────────────
7
- pandas==2.2.2
8
- numpy==1.26.4
9
- scipy==1.13.1
10
 
11
  # ── Machine Learning ────────────────────────────────────
12
  scikit-learn==1.5.0
 
4
  pydantic==2.7.1
5
 
6
  # ── Data Processing ─────────────────────────────────────
7
+ pandas>=2.2.0
8
+ numpy>=1.26.4
9
+ scipy>=1.13.1
10
 
11
  # ── Machine Learning ────────────────────────────────────
12
  scikit-learn==1.5.0