winglian commited on
Commit
e6937e8
1 Parent(s): 039e2a0

fix symlinks for axolotl outputs (#1625)

Browse files
docker/Dockerfile-cloud CHANGED
@@ -21,9 +21,7 @@ RUN apt install --yes --no-install-recommends openssh-server tmux && \
21
  printf "\n[[ -z \"\$TMUX\" ]] && { tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux; exit; }\n" >> ~/.bashrc && \
22
  printf "[ ! -z \"\$TERM\" -a -r /etc/motd ] && cat /etc/motd\n" >> ~/.bashrc && \
23
  chmod +x /workspace/axolotl/scripts/cloud-entrypoint.sh && \
24
- chmod +x /root/cloud-entrypoint.sh && \
25
- mkdir -p /workspace/data/axolotl-artifacts && \
26
- ln -sf /workspace/data/axolotl-artifacts /workspace/axolotl/outputs
27
 
28
  ENTRYPOINT ["/root/cloud-entrypoint.sh"]
29
  CMD ["sleep", "infinity"]
 
21
  printf "\n[[ -z \"\$TMUX\" ]] && { tmux attach-session -t ssh_tmux || tmux new-session -s ssh_tmux; exit; }\n" >> ~/.bashrc && \
22
  printf "[ ! -z \"\$TERM\" -a -r /etc/motd ] && cat /etc/motd\n" >> ~/.bashrc && \
23
  chmod +x /workspace/axolotl/scripts/cloud-entrypoint.sh && \
24
+ chmod +x /root/cloud-entrypoint.sh
 
 
25
 
26
  ENTRYPOINT ["/root/cloud-entrypoint.sh"]
27
  CMD ["sleep", "infinity"]
outputs/.gitignore DELETED
@@ -1 +0,0 @@
1
- *
 
 
scripts/cloud-entrypoint.sh CHANGED
@@ -36,5 +36,12 @@ if [ "$JUPYTER_DISABLE" != "1" ]; then
36
  jupyter lab --port=8888 --ip=* --allow-root --ServerApp.allow_origin=* &
37
  fi
38
 
 
 
 
 
 
 
 
39
  # Execute the passed arguments (CMD)
40
  exec "$@"
 
36
  jupyter lab --port=8888 --ip=* --allow-root --ServerApp.allow_origin=* &
37
  fi
38
 
39
+ if [ ! -d "/workspace/data/axolotl-artifacts" ]; then
40
+ mkdir -p /workspace/data/axolotl-artifacts
41
+ fi
42
+ if [ ! -L "/workspace/axolotl/outputs" ]; then
43
+ ln -sf /workspace/data/axolotl-artifacts /workspace/axolotl/outputs
44
+ fi
45
+
46
  # Execute the passed arguments (CMD)
47
  exec "$@"