ayushm98 commited on
Commit
6d98425
·
1 Parent(s): 16ccf4e

Add Dockerfile for containerized deployment

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # Install system dependencies
6
+ RUN apt-get update && apt-get install -y \
7
+ build-essential \
8
+ curl \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Install Poetry
12
+ RUN pip install poetry==1.7.1
13
+
14
+ # Copy dependency files
15
+ COPY pyproject.toml poetry.lock* ./
16
+
17
+ # Install dependencies (no dev dependencies in production)
18
+ RUN poetry config virtualenvs.create false \
19
+ && poetry install --no-interaction --no-ansi --no-dev
20
+
21
+ # Copy source code
22
+ COPY src/ ./src/
23
+ COPY ml/ ./ml/
24
+
25
+ # Set Python path
26
+ ENV PYTHONPATH=/app/src
27
+
28
+ # Expose ports
29
+ EXPOSE 8000 8501
30
+
31
+ # Default command (API server)
32
+ CMD ["uvicorn", "cascade.api.main:app", "--host", "0.0.0.0", "--port", "8000"]