去背景
Some checks failed
Publish Docker Image / Build/Push Docker Image to Docker Hub (push) Has been cancelled
Some checks failed
Publish Docker Image / Build/Push Docker Image to Docker Hub (push) Has been cancelled
This commit is contained in:
parent
a1936dff31
commit
635fad0e3d
21
Dockerfile
21
Dockerfile
@ -1,24 +1,11 @@
|
||||
FROM continuumio/miniconda3:23.5.2-0 as builder
|
||||
FROM nvidia/cuda:12.4.1-cudnn-devel-ubuntu22.04 as builder
|
||||
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
apt-transport-https \
|
||||
bash \
|
||||
build-essential \
|
||||
git
|
||||
|
||||
RUN conda install 'ffmpeg>=4.4.0' -c conda-forge
|
||||
RUN conda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg python3-pip && rm -rf /var/lib/apt/lists/*
|
||||
RUN python3 -m pip install --no-cache-dir --upgrade pip && pip3 install --no-cache-dir torch torchvision --index-url https://download.pytorch.org/whl/cu118
|
||||
|
||||
WORKDIR /usr/local/src
|
||||
COPY . .
|
||||
|
||||
RUN pip --no-cache-dir -v install .
|
||||
|
||||
# optimize layers
|
||||
FROM debian:bullseye-slim
|
||||
COPY --from=builder /opt/conda /opt/conda
|
||||
ENV PATH=/opt/conda/bin:$PATH
|
||||
|
||||
WORKDIR /tmp
|
||||
ENTRYPOINT ["python", "-m", "backgroundremover.cmd.server"]
|
||||
ENTRYPOINT ["python3", "-m", "backgroundremover.cmd.server"]
|
||||
|
Loading…
x
Reference in New Issue
Block a user