File size: 743 Bytes
e250e4d
 
67850c9
 
e250e4d
 
8095d13
e250e4d
67850c9
 
c380462
67850c9
 
 
c380462
67850c9
e250e4d
 
 
67850c9
e250e4d
 
67850c9
e250e4d
 
67850c9
e250e4d
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
FROM python:3.10-slim

# Set a writable working directory
WORKDIR /home/user/app

# Install system dependencies
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*

# Create .chainlit, .files, and other folders needed by Chainlit
RUN mkdir -p /home/user/app/.chainlit /home/user/app/.files && chmod -R 777 /home/user/app

# Set optional Chainlit envs
ENV CHAINLIT_PROJECT_ROOT=/home/user/app
ENV CHAINLIT_FILES_PATH=/home/user/app/.files

# Copy dependency list and install
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy your chatbot code
COPY app.py .

# Expose port for Chainlit
EXPOSE 7860

# Run Chainlit
CMD ["chainlit", "run", "app.py", "--port", "7860", "--host", "0.0.0.0"]