Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
444 views
in Technique[技术] by (71.8m points)

python-3.x - 码头化python应用程序(dockerizing python application)

I am trying to dockerize my python script which is called QC.py .

(我正在尝试将名为QC.py python脚本QC.py 。)

to do so, I made a Dockerfile which looks like this:

(为此,我制作了一个Dockerfile :)

FROM python:3

ADD qc.py /

RUN pip install numpy
RUN pip install sklearn

CMD [ "python", "./qc.py" ]

but when I try to build an image using this command:

(但是当我尝试使用此命令构建映像时:)

docker build -t qc .

and then run it using this command:

(然后使用以下命令运行它:)

docker run qc

i can see that it is working and finishing the process but I do not know where the results are.

(我可以看到它正在运行并完成该过程,但我不知道结果在哪里。)

do you know what could be the problem?

(您知道可能是什么问题吗?)

in regular command line the results should be in the same directory.

(在常规命令行中,结果应位于同一目录中。)

  ask by user7249622 translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...