Skip to content

Commit

Permalink
Import release tarball from prebuilt RQD image
Browse files Browse the repository at this point in the history
  • Loading branch information
n-jay committed Nov 20, 2023
1 parent 14a8086 commit b0fe3d6
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions samples/rqd/cuda/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,48 +16,32 @@ RUN yum -y install \
RUN python3.6 -m pip install --upgrade pip
RUN python3.6 -m pip install --upgrade setuptools

COPY LICENSE ./
COPY requirements.txt ./
COPY --from=opencue/rqd /opt/opencue/rqd-0.22-custom-all.tar.gz /opt/opencue/rqd-0.22-custom-all.tar.gz
COPY --from=opencue/rqd /opt/opencue/proto/ /opt/opencue/proto/

RUN python3.6 -m pip install -r requirements.txt
RUN mkdir -p /etc/opencue
COPY --from=opencue/rqd /etc/opencue/rqd.conf /etc/opencue/rqd.conf

COPY proto/ ./proto
COPY rqd/deploy ./rqd/deploy
COPY rqd/README.md ./rqd/
COPY rqd/setup.py ./rqd/
COPY rqd/tests/ ./rqd/tests
COPY rqd/rqd/ ./rqd/rqd
RUN tar -xvf /opt/opencue/rqd-0.22-custom-all.tar.gz --strip-components=1

RUN python3.6 -m pip install -r requirements.txt

RUN python3.6 -m grpc_tools.protoc \
-I=./proto \
--python_out=./rqd/rqd/compiled_proto \
--grpc_python_out=./rqd/rqd/compiled_proto \
./proto/*.proto

# Fix imports to work in both Python 2 and 3. See
# <https://github.com/protocolbuffers/protobuf/issues/1491> for more info.
RUN 2to3 -wn -f import rqd/rqd/compiled_proto/*_pb2*.py

COPY VERSION.in VERSIO[N] ./
RUN test -e VERSION || echo "$(cat VERSION.in)-custom" | tee VERSION

RUN cd rqd && python3.6 setup.py test
RUN cd rqd && python3.6 setup.py install

# This step isn't really needed at runtime, but is used when publishing an OpenCue release
# from this build.
RUN versioned_name="rqd-$(cat ./VERSION)-all" \
&& cp LICENSE requirements.txt VERSION rqd/ \
&& mv rqd $versioned_name \
&& tar -cvzf $versioned_name.tar.gz $versioned_name/* \
&& ln -s $versioned_name rqd

RUN mkdir -p /etc/opencue
RUN echo "[Override]" > /etc/opencue/rqd.conf
RUN echo "USE_NIMBY_PYNPUT=false" >> /etc/opencue/rqd.conf

# RQD gRPC server
EXPOSE 8444

# NOTE: This shell out is needed to avoid RQD getting PID 0 which leads to leaking child processes.
ENTRYPOINT ["/bin/bash", "-c", "set -e && rqd"]

0 comments on commit b0fe3d6

Please sign in to comment.