Badal commited on
Commit ·
f26dfa4
1
Parent(s): 91d29b6
Use /home instead of /home/user
Browse files- Dockerfile +5 -6
- entrypoint.sh +2 -2
Dockerfile
CHANGED
|
@@ -27,9 +27,8 @@ RUN apt-get update && apt-get install -y \
|
|
| 27 |
RUN curl -fsSL https://opencode.ai/install | bash
|
| 28 |
|
| 29 |
|
| 30 |
-
# 4. Setup
|
| 31 |
-
RUN
|
| 32 |
-
RUN mkdir -p /home/user && chmod 777 /home/user
|
| 33 |
|
| 34 |
|
| 35 |
# 5. Copy entrypoint script
|
|
@@ -38,9 +37,9 @@ RUN chmod +x /entrypoint.sh
|
|
| 38 |
|
| 39 |
|
| 40 |
# 6. Environment settings with RAM limit
|
| 41 |
-
ENV OPENCODE_DATA_DIR=/home
|
| 42 |
-
ENV HOME=/home
|
| 43 |
-
ENV PATH="/root/.local/bin:/home/node/.local/bin:/home/
|
| 44 |
ENV NODE_OPTIONS="--max-old-space-size=14336"
|
| 45 |
|
| 46 |
|
|
|
|
| 27 |
RUN curl -fsSL https://opencode.ai/install | bash
|
| 28 |
|
| 29 |
|
| 30 |
+
# 4. Setup folders
|
| 31 |
+
RUN mkdir -p /home && chmod 777 /home
|
|
|
|
| 32 |
|
| 33 |
|
| 34 |
# 5. Copy entrypoint script
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
# 6. Environment settings with RAM limit
|
| 40 |
+
ENV OPENCODE_DATA_DIR=/home
|
| 41 |
+
ENV HOME=/home
|
| 42 |
+
ENV PATH="/root/.local/bin:/home/node/.local/bin:/home/.local/bin:$PATH"
|
| 43 |
ENV NODE_OPTIONS="--max-old-space-size=14336"
|
| 44 |
|
| 45 |
|
entrypoint.sh
CHANGED
|
@@ -8,7 +8,7 @@ export HF_TOKEN="${HF_TOKEN}"
|
|
| 8 |
|
| 9 |
# Variables
|
| 10 |
BUCKET='hf://buckets/bk939448/opencodeai'
|
| 11 |
-
SOURCE='/home
|
| 12 |
|
| 13 |
# Configure Git
|
| 14 |
git config --global user.email 'badal@example.com'
|
|
@@ -57,7 +57,7 @@ while true; do
|
|
| 57 |
exit 1
|
| 58 |
fi
|
| 59 |
|
| 60 |
-
# Wait for any file change in /home
|
| 61 |
# Excludes .mdb files, .cache folder, .npm folder from triggering sync
|
| 62 |
inotifywait -r -e modify,create,delete,move \
|
| 63 |
--exclude '.*\.mdb$' \
|
|
|
|
| 8 |
|
| 9 |
# Variables
|
| 10 |
BUCKET='hf://buckets/bk939448/opencodeai'
|
| 11 |
+
SOURCE='/home'
|
| 12 |
|
| 13 |
# Configure Git
|
| 14 |
git config --global user.email 'badal@example.com'
|
|
|
|
| 57 |
exit 1
|
| 58 |
fi
|
| 59 |
|
| 60 |
+
# Wait for any file change in /home (blocks until change detected)
|
| 61 |
# Excludes .mdb files, .cache folder, .npm folder from triggering sync
|
| 62 |
inotifywait -r -e modify,create,delete,move \
|
| 63 |
--exclude '.*\.mdb$' \
|