사용자 도구

사이트 도구


tmux:script

차이

문서의 선택한 두 판 사이의 차이를 보여줍니다.

차이 보기로 링크

다음 판
이전 판
tmux:script [2024/05/17 01:24] – 만듦 rex8312tmux:script [2025/04/15 10:24] (현재) rex8312
줄 46: 줄 46:
 tmux -2 attach-session # 마지막 sesion에 attach tmux -2 attach-session # 마지막 sesion에 attach
 </code> </code>
 +
 +====== uv로 임시 환경 만들어 사용 ======
 +
 +<code python>
 +tmux new-session -d  # detach 상태로 시작
 +
 +tmux split-window -h
 +tmux split-window -v
 +# tmux split-window -v
 +# tmux select-layout tiled
 +
 +# global 환경변수 설정
 +export UVRUN="uv run --python=3.10 \
 +--with=ipython \
 +--with=zmq \
 +--with=gym==0.25.1 \
 +--with=git+https://github.com/djcunningham0/multielo.git \
 +--with=matplotlib \
 +--with=visdom==0.1.8.9 \
 +--with=natsort \
 +--with=psutil \
 +--with=netifaces \
 +--with=tensorboard \
 +--with=torchinfo \
 +--with=faster_fifo \
 +--with=protobuf==3.20.3 \
 +--with=uvloop \
 +--with=mlflow \
 +--with=termcolor \
 +--with=torch-ema \
 +--with=einops \
 +--with=blosc2 \
 +--with=seaborn \
 +--with=scikit-image"
 +
 +tmux select-pane -t 0  # 1번 pane 선택
 +tmux send-keys "$UVRUN ipython" C-m  # " "을 써야 UVRUN이 환경변수 값으로 대체됨
 +
 +tmux select-pane -t 1  # 0번 pane 선택
 +tmux send-keys "$UVRUN ipython" C-m
 +
 +tmux select-pane -t 2  # 1번 pane 선택
 +tmux send-keys "$UVRUN ipython" C-m
 +
 +# 마지막에 focus 맞추고 있을 pane 선택
 +# tmux setw synchronize-panes # 키입력 동기화
 +tmux -2 attach-session # 마지막 session에 attach
 +</code>
 +
  
 {{tag>tmux }} {{tag>tmux }}
tmux/script.1715909072.txt.gz · 마지막으로 수정됨: 저자 rex8312