Skip to content

Commit

Permalink
pytorch image uses conda
Browse files Browse the repository at this point in the history
derneuere authored Dec 22, 2024
1 parent 38ff68c commit 4a25ffb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions backend-gpu/base/Dockerfile
Original file line number Diff line number Diff line change
@@ -94,7 +94,7 @@ RUN git clone --depth 1 --branch 'master' https://github.com/davisking/dlib.git
python3 setup.py install --no USE_AVX_INSTRUCTIONS --no USE_SSE4_INSTRUCTIONS && \
rm -rf /tmp/builds/*

RUN ls -l /usr/local/lib/python3.11/dist-packages
RUN ls -l /opt/conda/lib/python3.10/site-packages/

# Stage 2: Deployment Stage
FROM pytorch/pytorch:2.3.1-cuda11.8-cudnn8-runtime
@@ -142,7 +142,7 @@ COPY --from=builder /usr/local/lib/libMagick* /usr/local/lib/
COPY --from=builder /usr/local/lib/libmagic* /usr/local/lib/
COPY --from=builder /usr/local/lib/libraw* /usr/local/lib/
COPY --from=builder /usr/local/bin/magick /usr/local/bin
COPY --from=builder /usr/local/lib/python3.11/dist-packages/dlib-19.24.99-py3.11-linux-x86_64.egg /usr/local/lib/python3.11/dist-packages/
COPY --from=builder /opt/conda/lib/python3.10/site-packages/dlib-19.24.99-py3.10-linux-x86_64.egg /opt/conda/lib/python3.10/site-packages/
# Debug Python environment and dlib installation
RUN python3 --version && \
which python3 && \
@@ -152,10 +152,10 @@ RUN python3 --version && \
echo "dlib not found"

# Create fake dist info for dlib
RUN mkdir -p /usr/local/lib/python3.11/dist-packages/dlib-19.24.99.dist-info && \
echo "Metadata-Version: 2.1\nName: dlib\nVersion: 19.24.99\n" > /usr/local/lib/python3.11/dist-packages/dlib-19.24.99.dist-info/METADATA && \
echo "INSTALLER: pip\n" > /usr/local/lib/python3.11/dist-packages/dlib-19.24.99.dist-info/INSTALLER && \
touch /usr/local/lib/python3.11/dist-packages/dlib-19.24.99.dist-info/RECORD
RUN mkdir -p /opt/conda/lib/python3.10/site-packages/dlib-19.24.99.dist-info && \
echo "Metadata-Version: 2.1\nName: dlib\nVersion: 19.24.99\n" > /opt/conda/lib/python3.10/site-packages/dlib-19.24.99.dist-info/METADATA && \
echo "INSTALLER: pip\n" > /opt/conda/lib/python3.10/site-packages/dlib-19.24.99.dist-info/INSTALLER && \
touch /opt/conda/lib/python3.10/site-packages/dlib-19.24.99.dist-info/RECORD

# Debugging: Ensure dlib is installed
RUN python -m pip show dlib || echo "dlib not found"

0 comments on commit 4a25ffb

Please sign in to comment.