Spaces:
Build error
Build error
Commit
·
52ce135
1
Parent(s):
d1aaf8f
Update Dockerfile
Browse files- Dockerfile +24 -29
Dockerfile
CHANGED
@@ -1,29 +1,24 @@
|
|
1 |
-
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
RUN
|
9 |
-
|
10 |
-
|
11 |
-
RUN
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
RUN
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
26 |
-
COPY --chown=user . $HOME/app
|
27 |
-
RUN ls
|
28 |
-
|
29 |
-
CMD ["python", "main.py"]
|
|
|
1 |
+
ARG PYTORCH="1.9.0"
|
2 |
+
ARG CUDA="11.1"
|
3 |
+
ARG CUDNN="8"
|
4 |
+
|
5 |
+
FROM pytorch/pytorch:${PYTORCH}-cuda${CUDA}-cudnn${CUDNN}-devel
|
6 |
+
|
7 |
+
# To fix GPG key error when running apt-get update
|
8 |
+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/3bf863cc.pub
|
9 |
+
RUN apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/7fa2af80.pub
|
10 |
+
|
11 |
+
RUN apt-get update && apt-get install -y git ninja-build libglib2.0-0 libsm6 libxrender-dev libxext6 libgl1-mesa-glx \
|
12 |
+
&& apt-get clean \
|
13 |
+
&& rm -rf /var/lib/apt/lists/*
|
14 |
+
|
15 |
+
RUN pip install -U openmim
|
16 |
+
RUN mim install mmengine
|
17 |
+
RUN mim install 'mmcv>=2.0.0rc1'
|
18 |
+
RUN pip install 'mmdet>=3.0.0rc0'
|
19 |
+
RUN git clone https://github.com/open-mmlab/mmocr.git /mmocr
|
20 |
+
WORKDIR /mmocr
|
21 |
+
# ENV FORCE_CUDA="1"
|
22 |
+
RUN pip install -r requirements.txt
|
23 |
+
RUN pip install --no-cache-dir -e .
|
24 |
+
RUN pip install -r requirements/albu.txt
|
|
|
|
|
|
|
|
|
|