-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (27 loc) · 908 Bytes
/
Dockerfile
File metadata and controls
37 lines (27 loc) · 908 Bytes
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
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Copy requirements file
COPY requirements.txt .
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy application code
COPY . .
# Make scripts executable
RUN chmod +x run.py
RUN chmod +x db_utils.py
RUN chmod +x test_agent.py
# Initialize the database
RUN python setup_database.py
RUN python add_user_purchase_data.py
# Set environment variables
ENV LLM_API_URL=http://host.docker.internal:1234
ENV DATABASE_PATH=sales_database.db
# Expose port for Streamlit
EXPOSE 8501
# Command to run the application
# Use purchase_behavior_app.py by default, but can be overridden with CMD in docker-compose
CMD ["streamlit", "run", "purchase_behavior_app.py", "--server.port=8501", "--server.address=0.0.0.0"]