LONGYKING
commited on
Commit
·
6d17cea
1
Parent(s):
0e14b64
deployment fixes
Browse files- Dockerfile +7 -5
Dockerfile
CHANGED
|
@@ -7,15 +7,17 @@ RUN useradd -m -u 1000 user
|
|
| 7 |
# Set the working directory in the container
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
-
# Install
|
| 11 |
-
# Note: You may need to switch back to root temporarily for this step
|
| 12 |
USER root
|
| 13 |
-
RUN apt-get update && \
|
| 14 |
-
|
| 15 |
libpq-dev \
|
| 16 |
gcc \
|
| 17 |
&& rm -rf /var/lib/apt/lists/*
|
| 18 |
|
|
|
|
|
|
|
|
|
|
| 19 |
# Switch back to the non-root user
|
| 20 |
USER user
|
| 21 |
|
|
@@ -29,4 +31,4 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 29 |
EXPOSE 8080
|
| 30 |
|
| 31 |
# Run chainlit when the container launches
|
| 32 |
-
CMD ["python", "-m", "chainlit", "run", "chatxbt-assistant.py", "--host", "0.0.0.0", "--port", "8080"]
|
|
|
|
| 7 |
# Set the working directory in the container
|
| 8 |
WORKDIR /app
|
| 9 |
|
| 10 |
+
# Install system dependencies
|
|
|
|
| 11 |
USER root
|
| 12 |
+
RUN apt-get update && apt-get install -y \
|
| 13 |
+
python3-dev \
|
| 14 |
libpq-dev \
|
| 15 |
gcc \
|
| 16 |
&& rm -rf /var/lib/apt/lists/*
|
| 17 |
|
| 18 |
+
# Ensure .files directory exists and is writable
|
| 19 |
+
RUN mkdir -p /app/.files && chown -R user:user /app/.files
|
| 20 |
+
|
| 21 |
# Switch back to the non-root user
|
| 22 |
USER user
|
| 23 |
|
|
|
|
| 31 |
EXPOSE 8080
|
| 32 |
|
| 33 |
# Run chainlit when the container launches
|
| 34 |
+
CMD ["python", "-m", "chainlit", "run", "chatxbt-assistant.py", "--host", "0.0.0.0", "--port", "8080"]
|