Spaces:
Runtime error
Runtime error
Jitesh Jain
commited on
Commit
·
21d9813
1
Parent(s):
b506646
Compile Worked, fix path data
Browse files- Dockerfile +19 -18
- oneformer/data/tokenizer.py +2 -2
Dockerfile
CHANGED
|
@@ -31,31 +31,32 @@ RUN chmod -R 777 $WORKDIR
|
|
| 31 |
|
| 32 |
COPY requirements.txt $WORKDIR/requirements.txt
|
| 33 |
COPY . .
|
|
|
|
| 34 |
|
| 35 |
-
RUN pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
|
| 36 |
|
| 37 |
-
ARG TORCH_CUDA_ARCH_LIST=7.5+PTX
|
| 38 |
|
| 39 |
|
| 40 |
-
RUN pip install ninja
|
| 41 |
|
| 42 |
-
USER root
|
| 43 |
-
RUN chown -R user:user /usr
|
| 44 |
-
RUN chmod -R 777 /usr
|
| 45 |
-
RUN chown -R user:user $HOME
|
| 46 |
-
RUN chmod -R 777 $HOME
|
| 47 |
-
RUN chown -R user:user $WORKDIR
|
| 48 |
-
RUN chmod -R 777 $WORKDIR
|
| 49 |
|
| 50 |
-
USER user
|
| 51 |
-
RUN ln -s $WORKDIR/oneformer/modeling/pixel_decoder/ops/ $WORKDIR/ && ls && cd ops/ && FORCE_CUDA=1 python setup.py build --build-base=$WORKDIR/ install --user && cd ..
|
| 52 |
-
RUN sh deform_setup.sh
|
| 53 |
|
| 54 |
-
USER user
|
| 55 |
-
RUN sh deform_setup.sh
|
| 56 |
|
| 57 |
-
USER user
|
| 58 |
|
| 59 |
-
EXPOSE 7860
|
| 60 |
|
| 61 |
-
ENTRYPOINT ["python", "gradio_app.py"]
|
|
|
|
| 31 |
|
| 32 |
COPY requirements.txt $WORKDIR/requirements.txt
|
| 33 |
COPY . .
|
| 34 |
+
RUN cat $WORKDIR/oneformer/data/bpe_simple_vocab_16e6.txt
|
| 35 |
|
| 36 |
+
# RUN pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
|
| 37 |
|
| 38 |
+
# ARG TORCH_CUDA_ARCH_LIST=7.5+PTX
|
| 39 |
|
| 40 |
|
| 41 |
+
# RUN pip install ninja
|
| 42 |
|
| 43 |
+
# USER root
|
| 44 |
+
# RUN chown -R user:user /usr
|
| 45 |
+
# RUN chmod -R 777 /usr
|
| 46 |
+
# RUN chown -R user:user $HOME
|
| 47 |
+
# RUN chmod -R 777 $HOME
|
| 48 |
+
# RUN chown -R user:user $WORKDIR
|
| 49 |
+
# RUN chmod -R 777 $WORKDIR
|
| 50 |
|
| 51 |
+
# USER user
|
| 52 |
+
# RUN ln -s $WORKDIR/oneformer/modeling/pixel_decoder/ops/ $WORKDIR/ && ls && cd ops/ && FORCE_CUDA=1 python setup.py build --build-base=$WORKDIR/ install --user && cd ..
|
| 53 |
+
# RUN sh deform_setup.sh
|
| 54 |
|
| 55 |
+
# USER user
|
| 56 |
+
# RUN sh deform_setup.sh
|
| 57 |
|
| 58 |
+
# USER user
|
| 59 |
|
| 60 |
+
# EXPOSE 7860
|
| 61 |
|
| 62 |
+
# ENTRYPOINT ["python", "gradio_app.py"]
|
oneformer/data/tokenizer.py
CHANGED
|
@@ -37,8 +37,8 @@ import torch
|
|
| 37 |
|
| 38 |
@lru_cache()
|
| 39 |
def default_bpe():
|
| 40 |
-
|
| 41 |
-
|
| 42 |
return os.path.join(os.path.dirname(os.path.abspath(__file__)), 'bpe_simple_vocab_16e6.txt.gz')
|
| 43 |
|
| 44 |
@lru_cache()
|
|
|
|
| 37 |
|
| 38 |
@lru_cache()
|
| 39 |
def default_bpe():
|
| 40 |
+
url = 'https://github.com/SHI-Labs/OneFormer/blob/main/oneformer/data/bpe_simple_vocab_16e6.txt.gz'
|
| 41 |
+
wget.download(url, out=os.path.join(os.path.dirname(os.path.abspath(__file__)), 'bpe_simple_vocab_16e6.txt.gz'))
|
| 42 |
return os.path.join(os.path.dirname(os.path.abspath(__file__)), 'bpe_simple_vocab_16e6.txt.gz')
|
| 43 |
|
| 44 |
@lru_cache()
|