Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

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

python - Permission Denied docker Mac Os M1

I'm extremely new to docker and I keep running into "permission denied" issues. I was able to build an image using the following docker file:

FROM tensorflow/tensorflow:latest

ENV DEBIAN_FRONTEND=noninteractive

# Python

RUN apt-get update -y && apt-get upgrade -y &&
????apt-get install python-opencv -y &&
????pip install -U pip setuptools

RUN pip install keras jupyter && 
????pip install ipdb pytest pytest-cov python-coveralls coverage==3.7.1 pytest-xdist pep8 pytest-pep8 pydot_ng jupyter && 
????pip install Pillow scikit-learn notebook matplotlib nose pyyaml six h5py pandas scikit-image python-resize-image glob2 && 
????pip install opencv-python && 
????pip install --upgrade tensorflow-gpu tensorflow-probability

# COPY ST2inJupyter.js ~/.jupyter/custom/custom.js #this does not work.? put explicit abs path on image (abs path for files in directories outside Dockerfile do not work currently)
# Set up our notebook config.

COPY jupyter_notebook_config.py /root/.jupyter/
ADD startup /src/startup

ENV PYTHONPATH='/src/:$PYTHONPATH'

WORKDIR /src

#Configure Jupyter notebook port exposure
EXPOSE 8888

# For CUDA profiling, TensorFlow requires CUPTI.
ENV LD_LIBRARY_PATH usrlocalcudaextrasCUPTIlib64:$LD_LIBRARY_PATH

# TensorBoard (only needed for visualizing lower level TF models.? in keras, not really too helpful, but just keep in)
EXPOSE 6006

# Define startup bash script in external file (loaded via ADD or COPY above)
CMD /src/startup

When I run the docker image: docker run -v ${PWD}:/src/hostpwd -it -p 8888:8888 [image_name], I consistently keep getting the the "Permission Denied" Error. Here is what it looks like:

/bin/sh: 1: /src/startup: Permission denied

Can anyone help me solve this issue? I have a Mac OS and I have the preview version of docker for the new M1 chip.

question from:https://stackoverflow.com/questions/65911683/permission-denied-docker-mac-os-m1

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

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...