Turbiling commited on
Commit
f9cb9bf
·
verified ·
1 Parent(s): 372c82c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -2,20 +2,22 @@ FROM python:3.10-slim
2
 
3
  WORKDIR /app
4
 
5
- # Install dependencies for PDF handling and Git
6
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
 
8
- # Create a writable directory for Chainlit
9
  RUN mkdir -p /app/.chainlit && chmod -R 777 /app/.chainlit
 
10
 
11
  # Copy requirements and install
12
  COPY requirements.txt .
13
  RUN pip install --upgrade pip && pip install -r requirements.txt
14
 
15
- # Copy all app files
16
  COPY . .
17
 
18
- # Set environment variable for Chainlit storage
19
  ENV CHAINLIT_STORAGE_DIR=/app/.chainlit
20
 
 
21
  CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Install necessary system packages
6
  RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
7
 
8
+ # ✅ Create both Chainlit directories and set permissions
9
  RUN mkdir -p /app/.chainlit && chmod -R 777 /app/.chainlit
10
+ RUN mkdir -p /app/.files && chmod -R 777 /app/.files
11
 
12
  # Copy requirements and install
13
  COPY requirements.txt .
14
  RUN pip install --upgrade pip && pip install -r requirements.txt
15
 
16
+ # Copy the rest of the app
17
  COPY . .
18
 
19
+ # ✅ Set environment variable (good practice, though optional)
20
  ENV CHAINLIT_STORAGE_DIR=/app/.chainlit
21
 
22
+ # Run the Chainlit app
23
  CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]