Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +6 -7
Dockerfile
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
-
# Use stable Python version
|
| 2 |
FROM python:3.10
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
|
|
|
|
|
|
|
|
|
| 7 |
# Install system dependencies
|
| 8 |
RUN apt-get update && apt-get install -y \
|
| 9 |
git \
|
|
@@ -14,14 +16,11 @@ RUN apt-get update && apt-get install -y \
|
|
| 14 |
COPY requirements.txt .
|
| 15 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 16 |
|
| 17 |
-
# Copy
|
| 18 |
COPY . .
|
| 19 |
|
| 20 |
-
# Expose Chainlit default port
|
| 21 |
EXPOSE 8000
|
| 22 |
|
| 23 |
-
#
|
| 24 |
-
RUN mkdir -p /app/.files
|
| 25 |
-
|
| 26 |
-
# Run Chainlit
|
| 27 |
CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
|
|
|
|
| 1 |
FROM python:3.10
|
| 2 |
|
| 3 |
# Set working directory
|
| 4 |
WORKDIR /app
|
| 5 |
|
| 6 |
+
# Set Chainlit config path to a writable directory
|
| 7 |
+
ENV CHAINLIT_CONFIG_DIR=/tmp/.chainlit
|
| 8 |
+
|
| 9 |
# Install system dependencies
|
| 10 |
RUN apt-get update && apt-get install -y \
|
| 11 |
git \
|
|
|
|
| 16 |
COPY requirements.txt .
|
| 17 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 18 |
|
| 19 |
+
# Copy application code
|
| 20 |
COPY . .
|
| 21 |
|
| 22 |
+
# Expose Chainlit's default port
|
| 23 |
EXPOSE 8000
|
| 24 |
|
| 25 |
+
# Run the app using Chainlit
|
|
|
|
|
|
|
|
|
|
| 26 |
CMD ["chainlit", "run", "app.py", "--host", "0.0.0.0", "--port", "8000"]
|