loud-keyboard-72751
07/24/2024, 7:16 AM# Dockerfile
FROM <http://nvcr.io/nvidia/cuda:11.0.3-base-ubuntu20.04|nvcr.io/nvidia/cuda:11.0.3-base-ubuntu20.04>
# Set the working directory in the container
WORKDIR /app
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONPATH /app
# Update the package list and install necessary packages
RUN apt-get update && \
apt-get install -y python3 python3-venv python3-pip && \
apt-get clean
# Copy the requirements file into the container
ENV VENV /opt/venv
COPY <http://requirements.in|requirements.in> .
# Create a virtual environment and install the required packages
RUN python3 -m venv ${VENV} && \
. ${VENV}/bin/activate && \
pip install --no-cache-dir -r <http://requirements.in|requirements.in>
ENV PATH="${VENV}/bin:$PATH"
COPY . .
# Alternatively, you can use ENTRYPOINT to automatically activate the virtual environment
# ENTRYPOINT ["/bin/bash", "-c", "source venv/bin/activate && exec bash"]
ARG tag
ENV FLYTE_INTERNAL_IMAGE $tag
It successfully runs with
pyflyte run --remote --image="<build image>" workflows/main.py workflow_name
And pods are using GPU's too. But Pods are running as a root instead of random pid.
And It's safety concern for us. we can not allow to run any process as a root. Is there anything I did wrong in building image. Or any settings I have to do with flyte for this.
Please help!
Thank youfreezing-airport-6809
high-accountant-32689
07/24/2024, 9:05 PMflytekit
in that case.loud-keyboard-72751
07/24/2024, 9:07 PM