Turbiling commited on
Commit
d39f630
·
verified ·
1 Parent(s): c380462

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -1,26 +1,26 @@
1
  FROM python:3.10-slim
2
 
3
- # Set a writable working directory
4
  WORKDIR /workspace
5
 
6
  # Install system dependencies
7
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
8
 
9
- # Create a writable directory for Chainlit files
10
- RUN mkdir -p /workspace/.chainlit_files
11
 
12
- # Set environment variables to point to the writable directory
13
  ENV CHAINLIT_PROJECT_ROOT=/workspace
14
- ENV CHAINLIT_FILES_PATH=/workspace/.chainlit_files
15
 
16
- # Copy files
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
 
20
  COPY app.py .
21
 
22
- # Expose port for Chainlit
23
  EXPOSE 7860
24
 
25
- # Start the Chainlit app
26
  CMD ["chainlit", "run", "app.py", "--port", "7860", "--host", "0.0.0.0"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Set working directory (should be writable)
4
  WORKDIR /workspace
5
 
6
  # Install system dependencies
7
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Create writable .files directory before running anything
10
+ RUN mkdir -p /workspace/.files && chmod -R 777 /workspace/.files
11
 
12
+ # Environment (optional but safe)
13
  ENV CHAINLIT_PROJECT_ROOT=/workspace
 
14
 
15
+ # Copy Python dependencies and install
16
  COPY requirements.txt .
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
+ # Copy your Chainlit app
20
  COPY app.py .
21
 
22
+ # Expose Chainlit's default port
23
  EXPOSE 7860
24
 
25
+ # Run Chainlit on public port
26
  CMD ["chainlit", "run", "app.py", "--port", "7860", "--host", "0.0.0.0"]