Turbiling commited on
Commit
67850c9
·
verified ·
1 Parent(s): be6fbde

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -10
Dockerfile CHANGED
@@ -1,26 +1,27 @@
1
  FROM python:3.10-slim
2
 
3
- # Set 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 Chainlit folders and give full access
10
- RUN mkdir -p /workspace/.files /workspace/.chainlit && chmod -R 777 /workspace/.files /workspace/.chainlit
11
 
12
- # Optional environment var for safety
13
- ENV CHAINLIT_PROJECT_ROOT=/workspace
 
14
 
15
- # Install Python dependencies
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 port
23
  EXPOSE 7860
24
 
25
- # Run Chainlit app
26
  CMD ["chainlit", "run", "app.py", "--port", "7860", "--host", "0.0.0.0"]
 
1
  FROM python:3.10-slim
2
 
3
+ # Set a writable working directory
4
+ WORKDIR /home/user/app
5
 
6
  # Install system dependencies
7
  RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
8
 
9
+ # Create .chainlit, .files, and other folders needed by Chainlit
10
+ RUN mkdir -p /home/user/app/.chainlit /home/user/app/.files && chmod -R 777 /home/user/app
11
 
12
+ # Set optional Chainlit envs
13
+ ENV CHAINLIT_PROJECT_ROOT=/home/user/app
14
+ ENV CHAINLIT_FILES_PATH=/home/user/app/.files
15
 
16
+ # Copy dependency list and install
17
  COPY requirements.txt .
18
  RUN pip install --no-cache-dir -r requirements.txt
19
 
20
+ # Copy your chatbot code
21
  COPY app.py .
22
 
23
+ # Expose port for Chainlit
24
  EXPOSE 7860
25
 
26
+ # Run Chainlit
27
  CMD ["chainlit", "run", "app.py", "--port", "7860", "--host", "0.0.0.0"]