Skip to content

Commit

Permalink
fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaimran08 committed Nov 29, 2023
1 parent 1894d21 commit 3219102
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 deletions.
15 changes: 8 additions & 7 deletions serve-python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,22 @@ RUN useradd -m -u 1000 $USER
# Set working directory (this is where the code should go)
WORKDIR $HOME

RUN apt update \
&& apt install python3.7-dev -y \
&& apt install curl -y \
&& apt-get install python3-distutils -y \
RUN apt-get update \
&& apt-get install ca-certificates -y --no-install-recommends \
&& apt-get install python3.7-dev -y --no-install-recommends \
&& apt-get install curl -y --no-install-recommends \
&& apt-get install python3-distutils -y --no-install-recommends \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3.7 get-pip.py \
&& apt install gcc -y \
&& apt-get install gcc -y --no-install-recommends \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 \
&& pip3 install --upgrade pip \
&& pip3 install --upgrade pip --no-cache-dir \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# RUN /bin/bash -c "apt update"
# RUN /bin/bash -c "curl https://dl.min.io/client/mc/release/linux-amd64/mc --output mc && chmod +x mc"
COPY requirements.txt $HOME/requirements.txt
RUN /bin/bash -c "pip3 install -r requirements.txt"
RUN /bin/bash -c "pip3 install -r requirements.txt --no-cache-dir"

COPY serve.py $HOME/serve.py
COPY deploy.sh $HOME/deploy.sh
Expand Down
18 changes: 10 additions & 8 deletions serve-python/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ RUN useradd -m -u 1000 $USER
# Set working directory (this is where the code should go)
WORKDIR $HOME

RUN apt update \
&& apt install python3.7-dev -y \
&& apt install curl -y \
&& apt-get install python3-distutils -y \
RUN apt-get update \
&& apt-get install ca-certificates -y --no-install-recommends \
&& apt-get install python3.7-dev -y --no-install-recommends \
&& apt-get install curl -y --no-install-recommends \
&& apt-get install python3-distutils -y --no-install-recommends \
&& curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py \
&& python3.7 get-pip.py \
&& apt install gcc -y \
&& apt-get install gcc -y --no-install-recommends \
&& update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.7 1 \
&& pip3 install --upgrade pip \
&& pip3 install --upgrade pip --no-cache-dir \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# RUN /bin/bash -c "apt update"
Expand All @@ -36,8 +37,9 @@ RUN chmod +x start-script.sh \
&& chmod +x deploy.sh \
&& chown -R $USER:$USER $HOME

RUN cd models && pip3 install -r requirements.txt && cd ..

WORKDIR $HOME/models
RUN pip3 install -r requirements.txt --no-cache-dir
WORKDIR $HOME
ENV STACKN_MODEL_PATH=$HOME/models
ENV PYTHONPATH=$HOME/models

Expand Down

0 comments on commit 3219102

Please sign in to comment.