From aa0e85f270ed7d23a15894cada56b08fda7f5d0d Mon Sep 17 00:00:00 2001 From: jakubknczny Date: Sun, 11 Apr 2021 12:24:29 +0200 Subject: [PATCH] Change Dockerfile - python3 pip --- Dockerfile | 20 +++++++++++++------- ium_zadanie1.py | 5 ++--- run.sh | 2 +- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/Dockerfile b/Dockerfile index a07e575..2620c25 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,19 @@ FROM ubuntu:20.04 -COPY . /app +RUN apt update >>/dev/null + +RUN apt install -y python3-pip >>/dev/null WORKDIR /app -RUN pip install kaggle -RUN pip install sklearn -RUN pip install pandas -RUN pip install seaborn -RUN pip install matplotlib +COPY . ./ -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 diff --git a/ium_zadanie1.py b/ium_zadanie1.py index ef1914f..9451951 100644 --- a/ium_zadanie1.py +++ b/ium_zadanie1.py @@ -1,4 +1,3 @@ -#!/usr/bin/env python3.7 import pandas as pd @@ -47,7 +46,7 @@ movies_subsets = pd.concat(movies_subsets, keys = ['Train','Test','Validation']) movies_subsets = movies_subsets.reset_index() 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') -plt.show(ax) +#plt.show(ax) 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() 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') -plt.show(ax) \ No newline at end of file +#plt.show(ax) diff --git a/run.sh b/run.sh index b43c343..3c55675 100644 --- a/run.sh +++ b/run.sh @@ -1,3 +1,3 @@ #!/bin/bash kaggle kernels output 'eugenioscionti/scraping-rotten-tomatoes-to-enrich-netflix-dataset' -python ium_zadanie1.py \ No newline at end of file +python3 ium_zadanie1.py