Change Dockerfile - python3 pip

This commit is contained in:
jakubknczny 2021-04-11 12:24:29 +02:00
parent 2db132700d
commit aa0e85f270
3 changed files with 16 additions and 11 deletions

View File

@ -1,13 +1,19 @@
FROM ubuntu:20.04 FROM ubuntu:20.04
COPY . /app RUN apt update >>/dev/null
RUN apt install -y python3-pip >>/dev/null
WORKDIR /app WORKDIR /app
RUN pip install kaggle COPY . ./
RUN pip install sklearn
RUN pip install pandas
RUN pip install seaborn
RUN pip install matplotlib
CMD ["run.sh"] RUN chmod +x run.sh
RUN pip3 install kaggle
RUN pip3 install sklearn
RUN pip3 install pandas
RUN pip3 install seaborn
RUN pip3 install matplotlib
CMD ./run.sh

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python3.7
import pandas as pd import pandas as pd
@ -47,7 +46,7 @@ movies_subsets = pd.concat(movies_subsets, keys = ['Train','Test','Validation'])
movies_subsets = movies_subsets.reset_index() movies_subsets = movies_subsets.reset_index()
ax = sns.boxplot(data = movies_subsets, x = 'level_0', y = 'rottentomatoes_audience_score') ax = sns.boxplot(data = movies_subsets, x = 'level_0', y = 'rottentomatoes_audience_score')
ax.set(title = 'Audience score distribution between subsets', ylabel = 'Audience score on Rotten Tomatoes', xlabel = 'SUBSET') ax.set(title = 'Audience score distribution between subsets', ylabel = 'Audience score on Rotten Tomatoes', xlabel = 'SUBSET')
plt.show(ax) #plt.show(ax)
series.duration = series.duration.str.extract(r'(\d*)( seasons?)')[0].astype('int32') series.duration = series.duration.str.extract(r'(\d*)( seasons?)')[0].astype('int32')
@ -75,4 +74,4 @@ series_subsets = pd.concat(series_subsets, keys = ['Train','Test','Validation'])
series_subsets = series_subsets.reset_index() series_subsets = series_subsets.reset_index()
ax = sns.boxplot(data = series_subsets, x = 'level_0', y = 'rottentomatoes_audience_score') ax = sns.boxplot(data = series_subsets, x = 'level_0', y = 'rottentomatoes_audience_score')
ax.set(title = 'Audience score distribution between subsets', ylabel = 'Audience score on Rotten Tomatoes', xlabel = 'SUBSET') ax.set(title = 'Audience score distribution between subsets', ylabel = 'Audience score on Rotten Tomatoes', xlabel = 'SUBSET')
plt.show(ax) #plt.show(ax)

2
run.sh
View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
kaggle kernels output 'eugenioscionti/scraping-rotten-tomatoes-to-enrich-netflix-dataset' kaggle kernels output 'eugenioscionti/scraping-rotten-tomatoes-to-enrich-netflix-dataset'
python ium_zadanie1.py python3 ium_zadanie1.py