-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
34 lines (26 loc) · 1.17 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
# Use Python 3.12 slim image as base
FROM python:3.12-slim
# Set working directory
WORKDIR /app
# Install required system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
&& 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 the application code and sample data
COPY hamock.* .
# Make the script executable
RUN chmod +x hamock.py
# Set environment variables with defaults
ENV HAMOCK_HASS_URL=localhost:8123
# Dummy token so you know what you're looking for. Substitute with your own (you have to create it)
ENV HAMOCK_HASS_ACCESS_TOKEN=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJmN2NjNTkyY2VkMjI0NTY2OWI4ZDY0OWQ4MmFkOGFlYiIsImlhdCI6MTcyODQwMzg4OSwiZXhwIjoyMDQzNzYzODg5fQ.OqEiy5SJFdjc70CFWR9IiP9eXgI7aAY8N7YeowfvEtM
ENV HAMOCK_OPENAI_URL=http://localhost:11434
ENV HAMOCK_OPENAI_MODEL=llama3.2-vision:latest
ENV HAMOCK_DISPLAY_STATS=false
ENV HAMOCK_INFER=true
#ENV HAMMOCK_DOWNLOAD_URL=<if set where to download the log from>
# Use hamock.py as entrypoint
ENTRYPOINT ["./hamock.sh", "replay", "--input", "state_replay.log"]