Spaces:
Running
Running
praeclarumjj3
commited on
Commit
•
3a97a52
1
Parent(s):
e469299
Fix user
Browse files- Dockerfile +4 -26
- oneformer/modeling/pixel_decoder/ops/make.sh +1 -1
Dockerfile
CHANGED
@@ -10,18 +10,6 @@ RUN apt-get update && apt-get install -y \
|
|
10 |
ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
|
11 |
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
13 |
-
# RUN apt-get -y update
|
14 |
-
# RUN apt install -y software-properties-common
|
15 |
-
# RUN add-apt-repository ppa:deadsnakes/ppa
|
16 |
-
# RUN apt-get -y install python3.8
|
17 |
-
# RUN apt-get -y install python3-pip
|
18 |
-
# RUN apt install -y python3.8-distutils
|
19 |
-
# RUN apt-get install -y gcc
|
20 |
-
# RUN apt-get install -y python3.8-dev
|
21 |
-
|
22 |
-
# RUN useradd -ms /bin/bash admin
|
23 |
-
# USER admin
|
24 |
-
|
25 |
RUN useradd -ms /bin/bash user
|
26 |
USER user
|
27 |
|
@@ -35,25 +23,15 @@ RUN pyenv install 3.8.15 && \
|
|
35 |
pyenv rehash && \
|
36 |
pip install --no-cache-dir --upgrade pip setuptools wheel
|
37 |
|
|
|
38 |
ENV WORKDIR=/code
|
39 |
WORKDIR $WORKDIR
|
40 |
RUN chown -R user:user $WORKDIR
|
41 |
RUN chmod 755 $WORKDIR
|
42 |
|
43 |
-
# RUN nvidia-smi
|
44 |
-
|
45 |
|
46 |
COPY requirements.txt $WORKDIR/requirements.txt
|
47 |
COPY oneformer $WORKDIR/oneformer
|
48 |
-
# RUN python3.8 --version
|
49 |
-
# RUN which python3.8
|
50 |
-
# RUN python3.8 -m pip install --upgrade pip
|
51 |
-
# RUN python3.8 -m pip install multidict
|
52 |
-
# RUN python3.8 -m pip install typing-extensions
|
53 |
-
# RUN python3.8 -m pip install --upgrade setuptools
|
54 |
-
# RUN python3.8 -m pip install wheel
|
55 |
-
# RUN python3.8 -m pip install cython
|
56 |
-
# RUN python3.8 -m pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
|
57 |
RUN pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
|
58 |
|
59 |
COPY . .
|
@@ -63,8 +41,8 @@ RUN ls
|
|
63 |
|
64 |
RUN sh deform_setup.sh
|
65 |
|
66 |
-
USER user
|
67 |
|
68 |
-
EXPOSE 7860
|
69 |
|
70 |
-
ENTRYPOINT ["python", "gradio_app.py"]
|
|
|
10 |
ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx \
|
11 |
&& rm -rf /var/lib/apt/lists/*
|
12 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
RUN useradd -ms /bin/bash user
|
14 |
USER user
|
15 |
|
|
|
23 |
pyenv rehash && \
|
24 |
pip install --no-cache-dir --upgrade pip setuptools wheel
|
25 |
|
26 |
+
ENV FORCE_CUDA="1"
|
27 |
ENV WORKDIR=/code
|
28 |
WORKDIR $WORKDIR
|
29 |
RUN chown -R user:user $WORKDIR
|
30 |
RUN chmod 755 $WORKDIR
|
31 |
|
|
|
|
|
32 |
|
33 |
COPY requirements.txt $WORKDIR/requirements.txt
|
34 |
COPY oneformer $WORKDIR/oneformer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
RUN pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
|
36 |
|
37 |
COPY . .
|
|
|
41 |
|
42 |
RUN sh deform_setup.sh
|
43 |
|
44 |
+
# USER user
|
45 |
|
46 |
+
# EXPOSE 7860
|
47 |
|
48 |
+
# ENTRYPOINT ["python", "gradio_app.py"]
|
oneformer/modeling/pixel_decoder/ops/make.sh
CHANGED
@@ -10,4 +10,4 @@
|
|
10 |
# Copyright (c) Facebook, Inc. and its affiliates.
|
11 |
# Modified by Bowen Cheng from https://github.com/fundamentalvision/Deformable-DETR
|
12 |
|
13 |
-
FORCE_CUDA=1
|
|
|
10 |
# Copyright (c) Facebook, Inc. and its affiliates.
|
11 |
# Modified by Bowen Cheng from https://github.com/fundamentalvision/Deformable-DETR
|
12 |
|
13 |
+
FORCE_CUDA=1 python setup.py build install
|