-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
86 lines (64 loc) · 1.85 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# Use Python 3.9 slim image as base
FROM python:3.9-slim
# Set working directory
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy project files
# COPY sukoon.py .
# COPY sukoon_api.py .
COPY . .
# Create necessary directories
RUN mkdir -p /app/prompts
RUN mkdir -p /app/storage
# Copy additional configuration files
# COPY prompts.yaml .
# COPY .env .
# Set environment variables
ENV PYTHONPATH=/app
ENV HOST=0.0.0.0
ENV PORT=8001
# Expose the port
EXPOSE 8001
# Run the FastAPI application
CMD ["uvicorn", "sukoon_api:app", "--host", "0.0.0.0", "--port", "8001"]
# # Use Python 3.9 slim image as base
# FROM python:3.9-slim
# # Set working directory
# WORKDIR /app
# # Install system dependencies
# RUN apt-get update && apt-get install -y \
# build-essential \
# python3-dev \
# && rm -rf /var/lib/apt/lists/*
# # Create project structure
# RUN mkdir -p /app/my_agent/utils
# # Copy requirements first to leverage Docker cache
# COPY my_agent/requirements.txt /app/my_agent/
# RUN pip install --no-cache-dir -r my_agent/requirements.txt
# # Copy project files
# COPY my_agent/__init__.py /app/my_agent/
# COPY my_agent/agent.py /app/my_agent/
# COPY my_agent/utils/ /app/my_agent/utils/
# COPY langgraph.json /app/
# COPY .env /app/
# # Set Python path
# ENV PYTHONPATH=/app
# # Create necessary directories
# RUN mkdir -p /app/prompts
# RUN mkdir -p /app/storage
# # Copy additional configuration files
# COPY prompts/prompts.yaml /app/prompts/
# # Set environment variables
# ENV HOST=0.0.0.0
# ENV PORT=8001
# # Expose the port
# EXPOSE 8001
# # Run the application
# CMD ["python", "-m", "my_agent.agent"]