我想在运行docker映像时传递GCP存储URL作为参数,以便它可以从存储中提取我的csv文件并打印数据集。
下面是我的dockerfile
import subprocess
command='im extractattachments[issue=10378365,overwriteExisting=confirm]'
process=subprocess.Popen(command,stdout=subprocess.PIPE,stderr=subprocess.PIPE,shell=True)
(out,err) = process.communicate()
我尝试通过以下命令运行docker映像并获得以下错误
# Use the official lightweight Python image.
# https://hub.docker.com/_/python
FROM continuumio/miniconda3
# Copy local code to the container image.
ENV APP_HOME /app
WORKDIR $APP_HOME
COPY . ./
# Install production dependencies.
RUN pip install flask gunicorn
RUN pip install scikit-learn==0.20.2 firefly-python==0.1.15
RUN pip install --upgrade google-cloud-storage
ENTRYPOINT ["python"]
CMD ["pre.py"]
。
docker run preprocess:v1 "https://storage.googleapis.com/MYBucket/app/Model/IrisClassifier.sav"
python: can't open file 'https://storage.googleapis.com/MYBucket/app/Model/IrisClassifier.sav': [Errno 2] No such file or directory
我想在运行docker映像时传递类似的GCP存储桶 https://storage.googleapis.com/MYBucket/app/Model/IrisClassifier.sav