cuOpt Server CLI#
This section describes the cuOpt Server CLI, which is a command-line interface for the cuOpt Server. Most of these options can also be configured using environment variables.
1usage: cuopt_service.py [-h] [-i IP] [-p PORT] [-d DATADIR] [-r RESULTDIR]
2 [-mr MAXRESULT] [-mo MODE]
3 [-l {critical,error,warning,info,debug}] [-f LOG_FILE]
4 [-lm LOG_MAX] [-b LOG_BACKUP]
5 [--ssl-certfile SSL_CERTFILE]
6 [--ssl-keyfile SSL_KEYFILE] [-g GPU_COUNT]
7 [-t {managed_default}]
8
9options:
10 -h, --help show this help message and exit
11 -i, --ip IP IP to the server, also can be set by environment
12 variable CUOPT_SERVER_IP
13 -p, --port PORT Port of the server, also can be set by environment
14 variable CUOPT_SERVER_PORT
15 -d, --datadir DATADIR
16 Data directory used to optionally pass cuopt problem
17 data files to /cuopt/request endpoint via the
18 filesystem instead of over http, also can be set by
19 environment variable CUOPT_DATA_DIR
20 -r, --resultdir RESULTDIR
21 Output directory used to optionally pass cuopt result
22 files from /cuopt/request endpoint via the filesystem
23 instead of over http, also can be set by environment
24 variable CUOPT_RESULT_DIR
25 -mr, --maxresult MAXRESULT
26 Maximum size (kilobytes) of a result returned over
27 http from /cuopt/request endpoint when RESULTDIR is
28 set. Set to 0 to have all results written to RESULTDIR
29 (default 250), also can be set by environment variable
30 CUOPT_MAX_RESULT
31 -mo, --mode MODE Mode (octal) of result files from /cuopt/request
32 endpoint (default is 644), also can be set by
33 environment variable CUOPT_RESULT_MODE
34 -l, --log-level {critical,error,warning,info,debug}
35 Log level, also can be set by environment variable
36 CUOPT_SERVER_LOG_LEVEL
37 -f, --log-file LOG_FILE
38 Log filename (by default logs to stdout), also can be
39 set by environment variable CUOPT_SERVER_LOG_FILE
40 -lm, --log-max LOG_MAX
41 Max bytes for a log file, also can be set by
42 environment variable CUOPT_SERVER_LOG_MAX
43 -b, --log-backup LOG_BACKUP
44 Number of backup log files, also can be set by
45 environment variable CUOPT_SERVER_LOG_BACKUP
46 --ssl-certfile SSL_CERTFILE
47 SSL certificate file with complete path, also can be
48 set by environment variable CUOPT_SSL_CERTFILE
49 --ssl-keyfile SSL_KEYFILE
50 SSL key file with complete path, also can be set by
51 environment variable CUOPT_SSL_KEYFILE
52 -g, --gpu-count GPU_COUNT
53 Number of available GPUs to use for solver processes
54 (the available GPUs can be affected by arguments to
55 'docker' when using a container and by the
56 CUDA_VISIBLE_DEVICES environment variable). If more
57 GPUs are requested than are available, cuopt will use
58 all available. Default is 1, zero will be ignored,
59 also can be set by environment variable
60 CUOPT_GPU_COUNT
61 -t, --tier {managed_default}
62 Feature tier for /cuopt/cuopt endpoint. This names a
63 feature tier defined in request_filter.py which
64 restricts allowed features or values for datasets in a
65 request. Not currently implemented for the
66 /cuopt/request endpoint. See request_filter.py for
67 details. Also can be set by environment variable
68 CUOPT_TIER