0

I am getting this error while making an image through docker. I want R version to be 3.6.0 and text2csv package version to be 0.5.1

** Error in install_version("text2vec", version = "0.5.1", repos = "http://cran.us.r-project.org"):
could not find function "install_version"
Execution halted **

Attached here is error Image

My docker file:

FROM public.ecr.aws/lts/ubuntu:latest
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y r-base
RUN R -e "install.packages(c('hms','devtools', repos = 'http://cran.us.r-project.org'))"
RUN R -e "install.packages('remotes', repos = 'http://cran.us.r-project.org')"
RUN R -e "require(remotes)"
RUN R -e "require(devtools)"
RUN R -e "install_version('text2vec', version = '0.5.1', repos = 'http://cran.us.r-project.org')"
COPY requirements.txt ./
RUN apt-get update && apt-get install -y \
    python3.8 \
    python3-pip
RUN pip3 install -r requirements.txt
RUN pip3 install \
    awslambdaric
COPY lambda_function.py ./
ENTRYPOINT [ "/usr/bin/python3", "-m", "awslambdaric" ]
CMD ["lambda_function.lambda_handler"]
Baig
  • 1
  • 3

0 Answers0