我使用docker run -e 'THEANO_FLAGS=mode=FAST_RUN,device=gpu0,floatX=float32' some_image python -u models/three_tier/three_tier.py --exp BEST_3TIER --seq_len 512 --big_frame_size 8 --frame_size 2 --emb_size 256 --skip_conn False --dim 1024 --n_rnn 1 --rnn_type GRU --q_levels 256 --q_type linear --batch_size 128 --weight_norm True --learn_h0 True --which_set MUSIC
和'Karma'。我的conf看起来像这样:
Angular
但是,当我执行命令时:
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma'),
require('karma-firefox-launcher')
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: require('path').join(__dirname, '../coverage'),
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['FirefoxHeadless'],
customLaunchers: {
'FirefoxHeadless': {
base: 'Firefox',
flags: [
'-headless',
],
}
},
singleRun: true
});
};
我的Firefox浏览器无法启动。在控制台中,我看到消息:
ng t
我的版本:
10% building 2/2 modules 0 active25 01 2019 13:59:40.553:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
25 01 2019 13:59:40.554:INFO [launcher]: Launching browser FirefoxHeadless with unlimited concurrency
25 01 2019 13:59:40.558:INFO [launcher]: Starting browser Firefox 25 01 2019 14:00:40.592:WARN [launcher]: Firefox have not captured in 60000 ms, killing.
25 01 2019 14:00:40.641:INFO [launcher]: Trying to start Firefox again (1/2).
25 01 2019 14:01:40.662:WARN [launcher]: Firefox have not captured in 60000 ms, killing.
25 01 2019 14:01:40.689:INFO [launcher]: Trying to start Firefox again (2/2).
25 01 2019 14:01:42.605:INFO [Firefox 64.0.0 (Ubuntu 0.0.0)]: Connected on socket UQxl3SDMuWplRfbLAAAA with id 53335141
25 01 2019 14:01:52.607:WARN [Firefox 64.0.0 (Ubuntu 0.0.0)]: Disconnected (1 times), because no message in 10000 ms.
Firefox 64.0.0 (Ubuntu 0.0.0) ERROR
Disconnected, because no message in 10000 ms.
Firefox 64.0.0 (Ubuntu 0.0.0) ERROR
Disconnected, because no message in 10000 ms.
我不明白为什么会这样。为什么浏览器无法启动?在"karma": "~1.7.1"
"karma-firefox-launcher": "^1.1.0"
"karma-jasmine": "~1.1.1"
Firefox 64.0
浏览器中没有这种问题,但是我确实需要Chrome
。
答案 0 :(得分:2)
我解决了这个问题。问题出在公司代理服务器上。我添加了karma.conf.js
:
customLaunchers: {
'FirefoxHeadless': {
base: 'Firefox',
flags: [
'-headless',
],
prefs: {
'network.proxy.type': 0
}
}
},
它奏效了。