Update Dockerfile
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Stage 1: Builder
|
||||
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04 as builder
|
||||
FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04 AS builder
|
||||
|
||||
WORKDIR /subgen
|
||||
|
||||
@@ -13,7 +13,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
# Copy requirements and install Python dependencies
|
||||
COPY requirements.txt .
|
||||
RUN pip3 install --no-cache-dir -r requirements.txt
|
||||
RUN pip install --no-cache-dir --prefix=/install -r requirements.txt --extra-index-url https://download.pytorch.org/wheel/cpu
|
||||
|
||||
# Copy application code
|
||||
COPY . .
|
||||
@@ -24,11 +24,10 @@ FROM nvidia/cuda:12.3.2-cudnn9-runtime-ubuntu22.04
|
||||
WORKDIR /subgen
|
||||
|
||||
# Copy necessary files from the builder stage
|
||||
COPY --from=builder /subgen/requirements.txt .
|
||||
COPY --from=builder /subgen/launcher.py .
|
||||
COPY --from=builder /subgen/subgen.py .
|
||||
COPY --from=builder /subgen/language_code.py .
|
||||
COPY --from=builder /user/local /usr/local
|
||||
COPY --from=builder /install /usr/local
|
||||
|
||||
# Install runtime dependencies
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
Reference in New Issue
Block a user