Spaces:
Runtime error
Runtime error
Create Dockerfile
Browse files- Dockerfile +23 -0
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM runpod/pytorch:2.2.1-py3.10-cuda12.1.1-devel-ubuntu22.04
|
2 |
+
WORKDIR /content
|
3 |
+
ENV PATH="/home/camenduru/.local/bin:${PATH}"
|
4 |
+
|
5 |
+
RUN adduser --disabled-password --gecos '' camenduru && \
|
6 |
+
adduser camenduru sudo && \
|
7 |
+
echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers && \
|
8 |
+
chown -R camenduru:camenduru /content && \
|
9 |
+
chmod -R 777 /content && \
|
10 |
+
chown -R camenduru:camenduru /home && \
|
11 |
+
chmod -R 777 /home && \
|
12 |
+
apt update -y && add-apt-repository -y ppa:git-core/ppa && apt update -y && apt install -y aria2 git git-lfs unzip ffmpeg
|
13 |
+
|
14 |
+
USER camenduru
|
15 |
+
|
16 |
+
RUN pip install -q opencv-python imageio imageio-ffmpeg ffmpeg-python av runpod \
|
17 |
+
git+https://github.com/facebookresearch/segment-anything-2 && \
|
18 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/sam2-hiera-large/resolve/main/sam2_hiera_large.pt -d /content -o sam2_hiera_large.pt && \
|
19 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/facebook/sam2-hiera-large/raw/main/sam2_hiera_l.yaml -d /content -o sam2_hiera_l.yaml
|
20 |
+
|
21 |
+
COPY ./worker_runpod.py /content/worker_runpod.py
|
22 |
+
WORKDIR /content
|
23 |
+
CMD python worker_runpod.py
|