Spaces:
Paused
Paused
Commit ·
dd6af34
1
Parent(s): 602b0ae
Fix brain2: Restore deps + mount + entrypoint
Browse files- Dockerfile +16 -16
- entrypoint.sh +1 -1
Dockerfile
CHANGED
|
@@ -1,20 +1,20 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
# 1. Install System Dependencies (SSHFS + Curl)
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
| 11 |
# Enable FUSE for non-root users
|
| 12 |
-
|
| 13 |
|
| 14 |
# 2. Install Cloudflared
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
|
| 19 |
RUN useradd -m -u 1000 user
|
| 20 |
USER user
|
|
@@ -27,11 +27,11 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
|
| 27 |
|
| 28 |
COPY --chown=user . /app
|
| 29 |
|
| 30 |
-
# Fix permissions
|
| 31 |
-
|
| 32 |
-
|
| 33 |
|
| 34 |
-
# Create mount point
|
| 35 |
-
|
| 36 |
|
| 37 |
-
CMD ["
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
# 1. Install System Dependencies (SSHFS + Curl)
|
| 4 |
+
RUN apt-get update && apt-get install -y \
|
| 5 |
+
sshfs \
|
| 6 |
+
curl \
|
| 7 |
+
fuse \
|
| 8 |
+
dos2unix \
|
| 9 |
+
&& rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
# Enable FUSE for non-root users
|
| 12 |
+
RUN echo "user_allow_other" >> /etc/fuse.conf
|
| 13 |
|
| 14 |
# 2. Install Cloudflared
|
| 15 |
+
RUN curl -L --output cloudflared.deb https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb && \
|
| 16 |
+
dpkg -i cloudflared.deb && \
|
| 17 |
+
rm cloudflared.deb
|
| 18 |
|
| 19 |
RUN useradd -m -u 1000 user
|
| 20 |
USER user
|
|
|
|
| 27 |
|
| 28 |
COPY --chown=user . /app
|
| 29 |
|
| 30 |
+
# Fix permissions
|
| 31 |
+
RUN chmod +x mount_azure.sh entrypoint.sh && \
|
| 32 |
+
dos2unix mount_azure.sh entrypoint.sh
|
| 33 |
|
| 34 |
+
# Create mount point
|
| 35 |
+
RUN mkdir -p /data/persistent && chmod 777 /data/persistent
|
| 36 |
|
| 37 |
+
CMD ["./entrypoint.sh"]
|
entrypoint.sh
CHANGED
|
@@ -4,7 +4,7 @@
|
|
| 4 |
# echo "user_allow_other" >> /etc/fuse.conf # Done in Dockerfile now
|
| 5 |
|
| 6 |
# Run Mount in Background (Don't block app)
|
| 7 |
-
|
| 8 |
|
| 9 |
# Start App (Main Process)
|
| 10 |
# Exec replaces the shell with uvicorn, handling signals correctly
|
|
|
|
| 4 |
# echo "user_allow_other" >> /etc/fuse.conf # Done in Dockerfile now
|
| 5 |
|
| 6 |
# Run Mount in Background (Don't block app)
|
| 7 |
+
./mount_azure.sh &
|
| 8 |
|
| 9 |
# Start App (Main Process)
|
| 10 |
# Exec replaces the shell with uvicorn, handling signals correctly
|