我在一个docker-compose.yml中有两个容器.两者在同一网络上都是相同的.我已经使用"depends_on"添加了依赖项,我能够ping另一个容器,但curl无效.
version: "2.1"
services:
web:
restart: always
build:
context: .
dockerfile: web.dockerfile
ports:
- "9000:8080"
expose:
- "8080"
networks:
- test
nginx_web:
restart: always
build:
context: .
dockerfile: nginx_web.dockerfile
ports:
- "8100:80"
expose:
- "80"
depends_on:
- web
networks:
- test
networks:
test:
Run Code Online (Sandbox Code Playgroud)
当我尝试从nginx_web容器ping到web时,它运行正常.但卷曲不起作用.我正进入(状态
curl: (7) Failed to connect to 172.28.0.7 port 8080: Connection refused
Run Code Online (Sandbox Code Playgroud)
当我从主机直接卷曲到9000端口的网络时,它工作正常.
我正在尝试在jenkins作业中创建virtualenv,然后安装requirements.txt.但我无法创建virtualenv.这就是我的Jenkins文件的样子.
sh 'sudo easy_install pip; pip install virtualenv'
Run Code Online (Sandbox Code Playgroud)
但我得到了
+ sudo easy_install pip
Searching for pip
Best match: pip 9.0.1
Processing pip-9.0.1-py2.7.egg
pip 9.0.1 is already the active version in easy-install.pth
Installing pip script to /usr/local/bin
Installing pip2.7 script to /usr/local/bin
Installing pip2 script to /usr/local/bin
Using /Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg
Processing dependencies for pip
Finished processing dependencies for pip
+ pip install virtualenv
/Users/Shared/Jenkins/Home/workspace/test-jenkinsfile@tmp/durable-e0a93859/script.sh: line 3: pip: command not found
Run Code Online (Sandbox Code Playgroud) 我目前正在研究人脸检测,然后是眼睛、嘴巴、鼻子和其他面部特征。对于上面的检测,我使用了haarcascade(正面脸、眼睛、右耳、左耳和嘴)。现在,如果脸部是正面的,一切正常和直。但是,如果面部处于侧视图中或旋转了,则效果不佳。对于侧视图,我使用了 lbscascade_profile.xml(它仅适用于脸部的右侧)。但是对于旋转的人脸,我无法检测到人脸。任何人都可以在上述上下文中帮助我。我在这里添加我的代码以便更好地理解。PS:提前致谢,请原谅我的幼稚问题(可能是因为我对编程非常陌生)。
void detectAndDisplay( Mat frame)
{
// create a vector array to store the face found
std::vector<Rect> faces;
Mat frame_gray;
bool mirror_image = false;
// convert the frame image into gray image file
cvtColor( frame, frame_gray, CV_BGR2GRAY);
//equalize the gray image file
equalizeHist( frame_gray, frame_gray);
//find the frontal faces and store them in vector array
face_cascade1.detectMultiScale(frame_gray,
faces,
1.1, 2,
0|CV_HAAR_SCALE_IMAGE|CV_HAAR_FIND_BIGGEST_OBJECT,
Size(40, 40),
Size(200, 200));
// find the right side face and store that in the face vector …
Run Code Online (Sandbox Code Playgroud)