Spaces:
Sleeping
Sleeping
fixing docker
Browse files- Dockerfile +11 -3
Dockerfile
CHANGED
|
@@ -1,11 +1,19 @@
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
|
|
|
|
|
|
| 4 |
COPY . .
|
| 5 |
|
| 6 |
-
RUN pip install --no-cache-dir -r requirements.txt
|
| 7 |
-
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
EXPOSE 7860
|
|
|
|
| 11 |
CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|
|
|
|
| 1 |
FROM python:3.10-slim
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
+
|
| 5 |
+
# Copy project files
|
| 6 |
COPY . .
|
| 7 |
|
| 8 |
+
RUN pip install --no-cache-dir -r requirements.txt
|
| 9 |
+
|
| 10 |
+
# Create the required directory and adjust its ownership
|
| 11 |
+
RUN mkdir -p /app/.files && chown -R 1000:1000 /app/.files
|
| 12 |
+
|
| 13 |
+
# Create a non-root user and switch to it
|
| 14 |
+
RUN adduser --disabled-password --gecos '' appuser && chown -R appuser:appuser /app
|
| 15 |
+
USER appuser
|
| 16 |
|
| 17 |
EXPOSE 7860
|
| 18 |
+
|
| 19 |
CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "7860"]
|