Execute a shell script that in turn runs a Python program, followed by an R program

0 votes

I've created a shell script that first runs a Python program to perform data pre-processing and then I'm trying to run an R program. I'm using Docker images for this:

FROM r-base:latest
FROM python
COPY . /usr/local/src/scripts
WORKDIR /usr/local/src/scripts
CMD ["./thisscript.sh"]

Inside thisscript.sh I've use the R CMD ... syntax for running my R script. But when I run the docker image, I get the following error:

./thisscript.sh: line 8: R: command not found

Any help?

Feb 6, 2019 in Data Analytics by Tyrion anex
• 8,320 points
41 views

1 answer to this question.

0 votes

You have two FROM commands in your Docker image. The FROM command is used to set the base image that your Dockerfile is created upon. You should always have only one of these. If you require additional tools that aren't in the base image, run commands that use platform-dependent package managers, like these:

RUN apt-get update && apt-get install -y \
    package-foo \
    package-bar

answered Feb 6, 2019 by Sophie may
• 9,900 points

Related Questions In Data Analytics

0 votes
1 answer

How do I remove an element from a list by index in R?

Use list[index] = NULL The list value will ...READ MORE

answered Oct 31, 2019 in Data Analytics by Cherukuri
• 32,420 points
52 views
0 votes
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 32,420 points
181 views
0 votes
2 answers

How to sum a variable by group in R?

You can also try this way, x_new = ...READ MORE

answered Jul 31, 2019 in Data Analytics by Cherukuri
• 32,420 points
13,483 views
0 votes
1 answer

R function for finding the index of an element in a vector?

Yes, we can find the index of ...READ MORE

answered Apr 13, 2018 in Data Analytics by zombie
• 3,750 points
2,248 views
+9 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 8, 2018 in Data Analytics by Anmol
• 3,680 points
95 views
0 votes
7 answers
0 votes
4 answers

Python vs. R for data science

I would say both Python and R ...READ MORE

answered Aug 1, 2019 in Data Analytics by briny
141 views
0 votes
1 answer
0 votes
1 answer

Can we have an if loop inside a for loop in R programming?

You're If loop doesn't have any condition ...READ MORE

answered Dec 21, 2018 in Data Analytics by Sophie may
• 9,900 points
54 views
0 votes
3 answers

Can a C program be written in R programming language?

If you have a algorithm you can ...READ MORE

answered Apr 9, 2019 in Data Analytics by anonymous
90 views