Skip to content

Commit

Permalink
Add ssh example to tests/data/example_server_startup
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Sep 24, 2024
1 parent a2421ce commit fb00f96
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/data/example_server_startup/ssh_example/cleanup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

rm test.db
rm -r Tasks
rm -r Artifacts
rm logs*
rm test.db-shm test.db-wal
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

# Create an empty db
poetry run fractalctl set-db

# Start the server
poetry run gunicorn fractal_server.main:app \
--workers 4 \
--worker-class uvicorn.workers.UvicornWorker \
--bind 0.0.0.0:8001 \
--access-logfile logs-fractal-server.access \
--error-logfile logs-fractal-server.error \
--logger-class fractal_server.gunicorn_fractal.FractalGunicornLogger \
16 changes: 16 additions & 0 deletions tests/data/example_server_startup/ssh_example/slurm_config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"default_slurm_config": {
"partition": "main",
"cpus_per_task": 1,
"mem": "100M"
},
"gpu_slurm_config": {},
"batching_config": {
"target_cpus_per_job": 1,
"max_cpus_per_job": 1,
"target_mem_per_job": 200,
"max_mem_per_job": 500,
"target_num_jobs": 2,
"max_num_jobs": 4
}
}

0 comments on commit fb00f96

Please sign in to comment.