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