-
Notifications
You must be signed in to change notification settings - Fork 95
/
Dockerfile
43 lines (33 loc) · 1.38 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM nvidia/cuda:12.3.1-devel-ubuntu22.04
# Install system dependencies
RUN apt-get update && \
apt-get install -y \
python3-pip python3-dev git ninja-build wget \
ffmpeg libsm6 libxext6 \
openmpi-bin libopenmpi-dev && \
ln -sf /usr/bin/python3 /usr/bin/python && \
ln -sf /usr/bin/pip3 /usr/bin/pip
# Set the working directory in the container
WORKDIR /usr/src/app
# Copy the current directory contents into the container at /usr/src/app
COPY . .
ENV FORCE_CUDA=1
# Upgrade pip
RUN python -m pip install --upgrade pip
# Install Python dependencies
RUN pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu123 \
&& pip install git+https://github.com/UX-Decoder/Segment-Everything-Everywhere-All-At-Once.git@33f2c898fdc8d7c95dda014a4b9ebe4e413dbb2b \
&& pip install git+https://github.com/facebookresearch/segment-anything.git \
&& pip install git+https://github.com/UX-Decoder/Semantic-SAM.git@package \
&& cd ops && bash make.sh && cd .. \
&& pip install mpi4py \
&& pip install openai \
&& pip install gradio==4.17.0
# Download pretrained models
RUN sh download_ckpt.sh
# Make port 6092 available to the world outside this container
EXPOSE 6092
# Make Gradio server accessible outside 127.0.0.1
ENV GRADIO_SERVER_NAME="0.0.0.0"
RUN chmod +x /usr/src/app/entrypoint.sh
CMD ["/usr/src/app/entrypoint.sh"]