josephrw commited on
Commit
0552af0
·
verified ·
1 Parent(s): f64a854

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -1
  2. app.py +2 -2
Dockerfile CHANGED
@@ -34,7 +34,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
34
 
35
  # Layer 1b: Install Julia via official binary (not in Kali apt)
36
  RUN curl -sL https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.4-linux-x86_64.tar.gz | tar xz -C /opt && \
37
- ln -s /opt/julia-1.10.4/bin/julia /usr/local/bin/julia
 
 
 
38
 
39
  # Layer 2: Install Kotlin, Clojure, Swift via SDKMAN/curl (not in Kali apt)
40
  RUN curl -s "https://get.sdkman.io" | bash && \
 
34
 
35
  # Layer 1b: Install Julia via official binary (not in Kali apt)
36
  RUN curl -sL https://julialang-s3.julialang.org/bin/linux/x64/1.10/julia-1.10.4-linux-x86_64.tar.gz | tar xz -C /opt && \
37
+ ln -s /opt/julia-1.10.4/bin/julia /usr/local/bin/julia && \
38
+ apt-get update && apt-get install -y --no-install-recommends execstack && \
39
+ execstack -c /opt/julia-1.10.4/lib/julia/libopenlibm.so 2>/dev/null || true && \
40
+ rm -rf /var/lib/apt/lists/*
41
 
42
  # Layer 2: Install Kotlin, Clojure, Swift via SDKMAN/curl (not in Kali apt)
43
  RUN curl -s "https://get.sdkman.io" | bash && \
app.py CHANGED
@@ -1932,7 +1932,7 @@ async def lang_execute(request: Request):
1932
  elif language == "ada":
1933
  cmd = f"cd {ws_dir} && gnatmake -q {filename} && ./{filename.replace('.adb', '')}"
1934
  elif language == "go":
1935
- cmd = f"cd {ws_dir} && go run {filename}"
1936
  elif language == "awk":
1937
  cmd = f"awk -f {filepath}"
1938
  else:
@@ -2838,7 +2838,7 @@ async def backup_create(request: Request):
2838
  backup_dir.mkdir(parents=True, exist_ok=True)
2839
  backup_name = f"{workspace}_{int(time.time())}"
2840
  backup_path = backup_dir / f"{backup_name}.tar.gz"
2841
- shutil.make_archive(str(backup_path.with_suffix("")), "gztar", str(ws_dir))
2842
  size = backup_path.stat().st_size
2843
  _add_audit_entry("backup_create", {"workspace": workspace, "backup": backup_name, "size": size})
2844
  return {"status": "created", "backup": backup_name, "size_bytes": size, "path": str(backup_path)}
 
1932
  elif language == "ada":
1933
  cmd = f"cd {ws_dir} && gnatmake -q {filename} && ./{filename.replace('.adb', '')}"
1934
  elif language == "go":
1935
+ cmd = f"cd {ws_dir} && [ -f go.mod ] || go mod init exec_temp && go run {filename}"
1936
  elif language == "awk":
1937
  cmd = f"awk -f {filepath}"
1938
  else:
 
2838
  backup_dir.mkdir(parents=True, exist_ok=True)
2839
  backup_name = f"{workspace}_{int(time.time())}"
2840
  backup_path = backup_dir / f"{backup_name}.tar.gz"
2841
+ shutil.make_archive(str(backup_dir / backup_name), "gztar", str(ws_dir))
2842
  size = backup_path.stat().st_size
2843
  _add_audit_entry("backup_create", {"workspace": workspace, "backup": backup_name, "size": size})
2844
  return {"status": "created", "backup": backup_name, "size_bytes": size, "path": str(backup_path)}