Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile (GPU Support, Workdir, Permissions) #1313

Merged
merged 2 commits into from
Sep 20, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Dockerfile
tensorflow/tensorflow:latest-gpu as base image
removed venv again
  • Loading branch information
ffalkenberg authored Sep 18, 2023
commit f80476c44bcbb43a302f7fc55e73b94045628cb0
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
FROM nvcr.io/nvidia/tensorflow:22.10.1-tf2-py3
# Use the TensorFlow GPU image as the base image. This image also works with CPU-only setups
FROM tensorflow/tensorflow@sha256:b4676741c491bff3d0f29c38c369281792c7d5c5bfa2b1aa93e5231a8d236323

ENV PYTHONUNBUFFERED=1
ENV PYTHONDONTWRITEBYTECODE=1
ENV DOCTR_CACHE_DIR=/app/.cache
ENV PATH=/app/venv/bin:$PATH

WORKDIR /app

COPY . .
ffalkenberg marked this conversation as resolved.
Show resolved Hide resolved

# Install necessary dependencies for video processing and GUI operations
RUN apt-get update \
&& apt-get install --no-install-recommends ffmpeg libsm6 libxext6 python3-venv -y \
&& apt-get install --no-install-recommends ffmpeg libsm6 libxext6 -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*

RUN python -m venv /app/venv \
&& pip install --upgrade pip setuptools wheel \
# Install the current application with TensorFlow extras and modify permissions
RUN pip install --upgrade pip setuptools wheel \
&& pip install -e .[tf] \
&& chmod -R a+w /app