Abeshith commited on
Commit
0c2f5e6
·
1 Parent(s): f6764f3

Fix Dockerfile for CI/CD builds

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -5
Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
  # Multi-stage build for minimal image size
2
- FROM python:3.11-slim as builder
3
 
4
  WORKDIR /app
5
 
@@ -13,23 +13,25 @@ COPY requirements.txt .
13
  RUN pip install --no-cache-dir --user -r requirements.txt
14
 
15
  # Runtime stage
16
- FROM python:3.11-slim
17
 
18
  WORKDIR /app
19
 
20
  # Copy installed packages from builder
21
  COPY --from=builder /root/.local /root/.local
22
 
23
- # Copy application code
24
  COPY src/ ./src/
25
  COPY app/ ./app/
26
  COPY config/ ./config/
27
- COPY templates/ ./templates/
28
- COPY .env .env
29
 
30
  # Add .local/bin to PATH
31
  ENV PATH=/root/.local/bin:$PATH
32
 
 
 
 
 
33
  # Expose FastAPI port
34
  EXPOSE 8000
35
 
 
1
  # Multi-stage build for minimal image size
2
+ FROM python:3.11-slim AS builder
3
 
4
  WORKDIR /app
5
 
 
13
  RUN pip install --no-cache-dir --user -r requirements.txt
14
 
15
  # Runtime stage
16
+ FROM python:3.11-slim AS runtime
17
 
18
  WORKDIR /app
19
 
20
  # Copy installed packages from builder
21
  COPY --from=builder /root/.local /root/.local
22
 
23
+ # Copy application code (templates are in app/templates/)
24
  COPY src/ ./src/
25
  COPY app/ ./app/
26
  COPY config/ ./config/
 
 
27
 
28
  # Add .local/bin to PATH
29
  ENV PATH=/root/.local/bin:$PATH
30
 
31
+ # Set environment variables for CI/CD (override with docker-compose or --env-file)
32
+ ENV MLFLOW_TRACKING_URI=""
33
+ ENV DAGSHUB_TOKEN=""
34
+
35
  # Expose FastAPI port
36
  EXPOSE 8000
37