admin管理员组文章数量:1290265
I am trying to train a classifier model. I am following instructions which outline to use the format bellow. whenever I go to then train my model, docker returns this error. I am unsure what I need to do to fix this.
CLASS_SAMPLES_SPECIFIC='[ \
{"SAMPLES": 6473, "CLASS": "BB"}, \
{"SAMPLES": 5262, "CLASS": "BC"}, \
{"SAMPLES": 4624, "CLASS": "BI"}, \
{"SAMPLES": 1287, "CLASS": "CH"}, \
{"SAMPLES": 7143, "CLASS": "CY"}, \
{"SAMPLES": 11516, "CLASS": "DR"}, \
{"SAMPLES": 12, "CLASS": "FS"}, \
{"SAMPLES": 4975, "CLASS": "GF"}, \
{"SAMPLES": 5915, "CLASS": "GS"}, \
{"SAMPLES": 5315, "CLASS": "HC"}, \
{"SAMPLES": 5121, "CLASS": "MO"}, \
{"SAMPLES": 1731, "CLASS": "MUD"}, \
{"SAMPLES": 5232, "CLASS": "OP"}, \
{"SAMPLES": 435, "CLASS": "PO"}, \
{"SAMPLES": 5921, "CLASS": "RB"}, \
{"SAMPLES": 6832, "CLASS": "RC"}, \
{"SAMPLES": 3028, "CLASS": "RF"}, \
{"SAMPLES": 3172, "CLASS": "RS"}, \
{"SAMPLES": 5200, "CLASS": "SK"}, \
{"SAMPLES": 5501, "CLASS": "TU"} \
]'
the error returned is :
docker: invalid env file (C:\Users\radia\OneDrive\Desktop\volume\env\training_env.env): variable '{"SAMPLES": 6473, "CLASS": "BB"},\ ' contains whitespaces.
I tried to remove all white spaces but continued to get the error. I believe it is a formatting issue.
I am trying to train a classifier model. I am following instructions which outline to use the format bellow. whenever I go to then train my model, docker returns this error. I am unsure what I need to do to fix this.
CLASS_SAMPLES_SPECIFIC='[ \
{"SAMPLES": 6473, "CLASS": "BB"}, \
{"SAMPLES": 5262, "CLASS": "BC"}, \
{"SAMPLES": 4624, "CLASS": "BI"}, \
{"SAMPLES": 1287, "CLASS": "CH"}, \
{"SAMPLES": 7143, "CLASS": "CY"}, \
{"SAMPLES": 11516, "CLASS": "DR"}, \
{"SAMPLES": 12, "CLASS": "FS"}, \
{"SAMPLES": 4975, "CLASS": "GF"}, \
{"SAMPLES": 5915, "CLASS": "GS"}, \
{"SAMPLES": 5315, "CLASS": "HC"}, \
{"SAMPLES": 5121, "CLASS": "MO"}, \
{"SAMPLES": 1731, "CLASS": "MUD"}, \
{"SAMPLES": 5232, "CLASS": "OP"}, \
{"SAMPLES": 435, "CLASS": "PO"}, \
{"SAMPLES": 5921, "CLASS": "RB"}, \
{"SAMPLES": 6832, "CLASS": "RC"}, \
{"SAMPLES": 3028, "CLASS": "RF"}, \
{"SAMPLES": 3172, "CLASS": "RS"}, \
{"SAMPLES": 5200, "CLASS": "SK"}, \
{"SAMPLES": 5501, "CLASS": "TU"} \
]'
the error returned is :
docker: invalid env file (C:\Users\radia\OneDrive\Desktop\volume\env\training_env.env): variable '{"SAMPLES": 6473, "CLASS": "BB"},\ ' contains whitespaces.
I tried to remove all white spaces but continued to get the error. I believe it is a formatting issue.
Share Improve this question asked Feb 20 at 6:51 user29722274user29722274 1 1 |1 Answer
Reset to default 0As described under the .env file syntax, each line in an .env file contains a key-value pair. You can't split them up over multiple lines like you do. This is also why it complains about the second line in your file and not the first.
Put the entire value on one line like this
CLASS_SAMPLES_SPECIFIC='[{"SAMPLES": 6473, "CLASS": "BB"},{"SAMPLES": 5262, "CLASS": "BC"},{"SAMPLES": 4624, "CLASS": "BI"},{"SAMPLES": 1287, "CLASS": "CH"},{"SAMPLES": 7143, "CLASS": "CY"},{"SAMPLES": 11516, "CLASS": "DR"},{"SAMPLES": 12, "CLASS": "FS"},{"SAMPLES": 4975, "CLASS": "GF"},{"SAMPLES": 5915, "CLASS": "GS"},{"SAMPLES": 5315, "CLASS": "HC"},{"SAMPLES": 5121, "CLASS": "MO"},{"SAMPLES": 1731, "CLASS": "MUD"},{"SAMPLES": 5232, "CLASS": "OP"},{"SAMPLES": 435, "CLASS": "PO"},{"SAMPLES": 5921, "CLASS": "RB"},{"SAMPLES": 6832, "CLASS": "RC"},{"SAMPLES": 3028, "CLASS": "RF"},{"SAMPLES": 3172, "CLASS": "RS"},{"SAMPLES": 5200, "CLASS": "SK"},{"SAMPLES": 5501, "CLASS": "TU"}]'
本文标签: environment variablesdocker invalid env file contains white spacesStack Overflow
版权声明:本文标题:environment variables - docker: invalid env file contains white spaces - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741455515a2379734.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
\n
C-style escaped newlines in a single physical line. The value looks like JSON, though, and that whitespace may not be necessary. (Could another path like a bind-mounted file or acurl -d
HTTP request body be a better way to provide this data?) – David Maze Commented Feb 20 at 11:22