chelleboyer commited on
Commit
86329b0
·
1 Parent(s): 1f8d83c

Add Dockerfile for Chainlit deployment

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -0
Dockerfile ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ libgl1-mesa-glx \
8
+ libglib2.0-0 \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Copy requirements first to leverage Docker cache
12
+ COPY requirements.txt .
13
+
14
+ # Install Python dependencies
15
+ RUN pip install --no-cache-dir -r requirements.txt
16
+
17
+ # Copy the rest of the application
18
+ COPY . .
19
+
20
+ # Create necessary directories
21
+ RUN mkdir -p data/planogram001
22
+
23
+ # Expose the port Chainlit runs on
24
+ EXPOSE 8000
25
+
26
+ # Set environment variables
27
+ ENV PYTHONPATH=/app
28
+ ENV HF_HUB_ENABLE_HF_TRANSFER=1
29
+
30
+ # Run the application
31
+ CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "8000"]