File tree Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Expand file tree Collapse file tree 4 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ The versions coincide with releases on pip. Only major versions will be released
16
16
## [ 0.0.x] ( https://github.com/flux-framework/flux-restful-api/tree/main ) (0.0.x)
17
17
- Fixing bug with launcher always being specified (0.0.1)
18
18
- catching any errors on creation of fluxjob
19
+ - Add support uvicorn workers (>1 needed to run >1 process with Flux)
19
20
- Project (faux) skeleton release (0.0.0)
Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ FROM fluxrm/flux-sched:focal
2
2
3
3
# docker build -t ghcr.io/flux-framework/flux-restful-api .
4
4
5
-
6
5
# This must be set to work (username / token set won't trigger it alone)
7
6
ARG use_auth
8
7
ARG user="fluxuser"
9
8
ARG token="12345"
10
9
ARG port="5000"
11
10
ARG host="0.0.0.0"
11
+ ARG workers="1"
12
12
LABEL maintainer="Vanessasaurus <@vsoch>"
13
13
14
14
USER root
@@ -28,4 +28,5 @@ ENV FLUX_TOKEN=${token}
28
28
ENV FLUX_REQUIRE_AUTH=${use_auth}
29
29
ENV PORT=${port}
30
30
ENV HOST=${host}
31
+ ENV WORKERS=${workers}
31
32
ENTRYPOINT ["/code/entrypoint.sh" ]
Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ Build arguments supported are:
35
35
| use_auth | Turn on authentication | unset (meaning false) |
36
36
| port | Port to run service on (and expose) | 5000 |
37
37
| host | Host to run service on (you probably shouldn't change this) | 0.0.0.0 |
38
+ | workers | Number of workers to run uvicorn with (required for Flux jobs with >1 process) | 1 |
38
39
39
40
And run it ensuring you expose port 5000. The container should show you if you've
40
41
correctly provided auth (or not):
@@ -65,7 +66,7 @@ needing to push a container to a registry. Here is how to specify a branch (and
65
66
or your own repository base:
66
67
67
68
``` bash
68
- $ docker run --env INSTALL_BRANCH=add/feature --env INSTALL_REPO=user/flux-restful-api -d --rm -it -p 5000:5000 ghcr.io/flux-framework/flux-restful-api
69
+ $ docker run --env INSTALL_BRANCH=add/feature --env INSTALL_REPO=user/flux-restful-api -d --rm -it -p 5000:5000 ghcr.io/flux-framework/flux-restful-api
69
70
```
70
71
71
72
Original file line number Diff line number Diff line change 13
13
14
14
# We always need to start in this PWD
15
15
cd /code
16
- flux start uvicorn app.main:app --host=${HOST} --port=${PORT}
16
+ flux start uvicorn app.main:app --host=${HOST} --port=${PORT} --workers= ${WORKERS}
You can’t perform that action at this time.
0 commit comments