Skip to content

Commit

Permalink
build: simplify dockerfile using requirements.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
max-niederman committed Nov 3, 2023
1 parent 8418287 commit c3915b8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 35 deletions.
24 changes: 7 additions & 17 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,10 @@
FROM tensorflow/tensorflow:latest-gpu
FROM nvidia/cuda:12.2.2-runtime-rockylinux8

WORKDIR /root
RUN dnf install python39 python39-pip -y

RUN apt-get update
RUN apt-get install -y make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev \
libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev git -y
RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv
ENV PYTHON_VERSION=3.9
ENV PYENV_ROOT="$HOME/.pyenv"
ENV PATH="${PYENV_ROOT}/shims:${PYENV_ROOT}/bin:${PATH}"
RUN eval "$(pyenv init -)"
RUN /root/.pyenv/bin/pyenv install ${PYTHON_VERSION}
RUN /root/.pyenv/bin/pyenv global ${PYTHON_VERSION}
RUN pip install --upgrade pip
RUN pip install tflite-model-maker
RUN pip install numpy==1.23.1 pycocotools roboflow
WORKDIR /root/app
COPY ./requirements.txt ./requirements.txt

COPY download.py .
RUN python3.9 -m pip install -r requirements.txt

COPY . .
18 changes: 0 additions & 18 deletions pyproject.toml

This file was deleted.

4 changes: 4 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
tflite-model-maker == 0.4.2
numpy == 1.23.1
pycocotools == 2.0.7
roboflow == 1.1.9

0 comments on commit c3915b8

Please sign in to comment.