mardi 6 août 2019

Getting Permission Denied error while accessing a file in Docker

I am trying to deploy a model on AWS Sagemaker and using the following docker file:

FROM ubuntu:16.04

#MAINTAINER Amazon AI <sage-learner@amazon.com>


RUN apt-get -y update && apt-get install -y --no-install-recommends \
 wget \
 python3.5-dev \
 gcc \
 nginx \
 ca-certificates \
 libgcc-5-dev \
 && rm -rf /var/lib/apt/lists/*

# Here we get all python packages.
# There's substantial overlap between scipy and numpy that we eliminate by
# linking them together. Likewise, pip leaves the install caches populated which uses
# a significant amount of space. These optimizations save a fair amount of space in the
# image, which reduces start up time.
RUN wget https://bootstrap.pypa.io/3.3/get-pip.py && python3.5 get-pip.py && \
    pip3 install numpy==1.14.3 scipy lightfm scikit-optimize pandas==0.22.0 flask gevent gunicorn && \
    rm -rf /root/.cache

# Set some environment variables. PYTHONUNBUFFERED keeps Python from buffering our standard
# output stream, which means that logs can be delivered to the user quickly. PYTHONDONTWRITEBYTECODE
# keeps Python from writing the .pyc files which are unnecessary in this case. We also update
# PATH so that the train and serve programs are found when the container is invoked.

ENV PYTHONUNBUFFERED=TRUE
ENV PYTHONDONTWRITEBYTECODE=TRUE
ENV PATH="/opt/program:${PATH}"

# Set up the program in the image
COPY lightfm /opt/program
WORKDIR /opt/program

After running this on my local or even on Sagemaker, I am getting the following error:

standard_init_linux.go:207: exec user process caused "permission denied"

Can anyone help?

Aucun commentaire:

Enregistrer un commentaire