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        IP to the server, also can be set by environment
12                        variable CUOPT_SERVER_IP
13  -p PORT, --port PORT  Port of the server, also can be set by environment
14                        variable CUOPT_SERVER_PORT
15  -d DATADIR, --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 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 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
32                        Mode (octal) of result files from /cuopt/request
33                        endpoint (default is 644), also can be set by
34                        environment variable CUOPT_RESULT_MODE
35  -l {critical,error,warning,info,debug}, --log-level {critical,error,warning,info,debug}
36                        Log level, also can be set by environment variable
37                        CUOPT_SERVER_LOG_LEVEL
38  -f LOG_FILE, --log-file LOG_FILE
39                        Log filename (by default logs to stdout), also can be
40                        set by environment variable CUOPT_SERVER_LOG_FILE
41  -lm LOG_MAX, --log-max LOG_MAX
42                        Max bytes for a log file, also can be set by
43                        environment variable CUOPT_SERVER_LOG_MAX
44  -b LOG_BACKUP, --log-backup LOG_BACKUP
45                        Number of backup log files, also can be set by
46                        environment variable CUOPT_SERVER_LOG_BACKUP
47  --ssl-certfile SSL_CERTFILE
48                        SSL certificate file with complete path, also can be
49                        set by environment variable CUOPT_SSL_CERTFILE
50  --ssl-keyfile SSL_KEYFILE
51                        SSL key file with complete path, also can be set by
52                        environment variable CUOPT_SSL_KEYFILE
53  -g GPU_COUNT, --gpu-count GPU_COUNT
54                        Number of available GPUs to use for solver processes
55                        (the available GPUs can be affected by arguments to
56                        'docker' when using a container and by the
57                        CUDA_VISIBLE_DEVICES environment variable). If more
58                        GPUs are requested than are available, cuopt will use
59                        all available. Default is 1, zero will be ignored,
60                        also can be set by environment variable
61                        CUOPT_GPU_COUNT
62  -t {managed_default}, --tier {managed_default}
63                        Feature tier for /cuopt/cuopt endpoint. This names a
64                        feature tier defined in request_filter.py which
65                        restricts allowed features or values for datasets in a
66                        request. Not currently implemented for the
67                        /cuopt/request endpoint. See request_filter.py for
68                        details. Also can be set by environment variable
69                        CUOPT_TIER