python fix

This commit is contained in:
Adam Wojdyla 2022-04-02 14:12:58 +02:00
parent 83bc088148
commit 1c106d7d67
4 changed files with 46 additions and 9 deletions

View File

@ -1,21 +1,33 @@
FROM ubuntu:latest
# COPY ./kaggle.json /root/.kaggle/kaggle.json
WORKDIR /app
RUN apt-get update && apt-get install -y figlet python3 python3-pip unzip
RUN pip3 install kaggle
RUN pip3 install pandas
RUN apt-get update && apt-get install -y
RUN apt-get install -y python3
RUN apt-get install -y unzip
RUN apt-get install -y python3-pip
RUN python3 -m pip --version
RUN python3 -m pip install kaggle
RUN python3 -m pip install pandas
RUN python3 -m pip freeze
# ENV PATH="/root/.local/bin:${PATH}"
COPY . .
COPY ./figlet-loop.sh ./
COPY ./download.sh ./
COPY ./script.py ./
# COPY ./figlet-loop.sh ./
# COPY ./download.sh ./
# COPY ./script.py ./
# COPY ./kaggle.json /root/.kaggle/kaggle.json
ARG KAGGLE_USERNAME=testKAGGLE_USERNAME
ARG KAGGLE_KEY=test1KAGGLE_KEY
RUN pip freeze
RUN chmod u+x ./script.py
# RUN ./download.sh 117928

24
Dockerfile-ubuntu Normal file
View File

@ -0,0 +1,24 @@
FROM ubuntu:latest
WORKDIR /app
RUN apt-get update && apt-get install -y figlet python3 python3-pip unzip
RUN pip3 install kaggle
RUN pip3 install pandas
# ENV PATH="/root/.local/bin:${PATH}"
COPY . .
COPY ./figlet-loop.sh ./
COPY ./download.sh ./
COPY ./script.py ./
# COPY ./kaggle.json /root/.kaggle/kaggle.json
ARG KAGGLE_USERNAME=testKAGGLE_USERNAME
ARG KAGGLE_KEY=test1KAGGLE_KEY
RUN pip freeze
RUN chmod u+x ./script.py
# RUN ./download.sh 117928
# RUN python3 ./script.py

View File

@ -26,9 +26,6 @@ pipeline {
stages {
stage('Prepare dataset') {
steps {
sh 'python3 -m pip install kaggle --no-cache-dir '
sh 'python3 -m pip install numpy --no-cache-dir '
sh 'python3 -m pip install pandas --no-cache-dir '
sh 'python3 ./script.py'
}
}

View File

@ -70,6 +70,10 @@ def normalize_dataset(dataset):
# install_dependencies()
print(os.system('python3 -m pip freeze'))
download_dataset()
unzip_package()
cars = pd.read_csv('./Car_Prices_Poland_Kaggle.csv')