Turbiling commited on
Commit
5200dc3
·
verified ·
1 Parent(s): b204fd0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -9
Dockerfile CHANGED
@@ -1,19 +1,16 @@
1
  FROM python:3.10-slim
2
 
3
- # Create a non-root user
4
- RUN useradd -m appuser
5
-
6
- # Create app directory and give ownership
7
  WORKDIR /app
8
- RUN mkdir -p /app/.files && chown -R appuser /app
9
 
10
- # Copy files and install dependencies
 
 
 
11
  COPY requirements.txt .
12
  RUN pip install --upgrade pip && pip install -r requirements.txt
 
13
  COPY . .
14
 
15
- # Switch to non-root user
16
- USER appuser
17
 
18
- # Run Chainlit
19
  CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
 
1
  FROM python:3.10-slim
2
 
 
 
 
 
3
  WORKDIR /app
 
4
 
5
+ RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
6
+
7
+ RUN mkdir -p /app/.chainlit && chmod -R 777 /app/.chainlit
8
+
9
  COPY requirements.txt .
10
  RUN pip install --upgrade pip && pip install -r requirements.txt
11
+
12
  COPY . .
13
 
14
+ ENV CHAINLIT_STORAGE_DIR=/app/.chainlit
 
15
 
 
16
  CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]