Skip to content

Commit

Permalink
fix symlinks for axolotl outputs (#1625)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian authored May 15, 2024
1 parent 039e2a0 commit e6937e8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 1 addition & 3 deletions docker/Dockerfile-cloud
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ RUN apt install --yes --no-install-recommends openssh-server tmux && \
printf "\n[[ -z \"\$TMUX\" ]] && { tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux; exit; }\n" >> ~/.bashrc && \
printf "[ ! -z \"\$TERM\" -a -r /etc/motd ] && cat /etc/motd\n" >> ~/.bashrc && \
chmod +x /workspace/axolotl/scripts/cloud-entrypoint.sh && \
chmod +x /root/cloud-entrypoint.sh && \
mkdir -p /workspace/data/axolotl-artifacts && \
ln -sf /workspace/data/axolotl-artifacts /workspace/axolotl/outputs
chmod +x /root/cloud-entrypoint.sh

ENTRYPOINT ["/root/cloud-entrypoint.sh"]
CMD ["sleep", "infinity"]
1 change: 0 additions & 1 deletion outputs/.gitignore

This file was deleted.

7 changes: 7 additions & 0 deletions scripts/cloud-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,12 @@ if [ "$JUPYTER_DISABLE" != "1" ]; then
jupyter lab --port=8888 --ip=* --allow-root --ServerApp.allow_origin=* &
fi

if [ ! -d "/workspace/data/axolotl-artifacts" ]; then
mkdir -p /workspace/data/axolotl-artifacts
fi
if [ ! -L "/workspace/axolotl/outputs" ]; then
ln -sf /workspace/data/axolotl-artifacts /workspace/axolotl/outputs
fi

# Execute the passed arguments (CMD)
exec "$@"

0 comments on commit e6937e8

Please sign in to comment.