hzhwcmhf commited on
Commit
2764838
1 Parent(s): 427b10d

fix dependency

Browse files
Files changed (2) hide show
  1. Dockerfile +6 -18
  2. README.md +3 -2
Dockerfile CHANGED
@@ -1,23 +1,11 @@
1
- FROM docker.io/library/python:3.8.9@sha256:49d05fff9cb3b185b15ffd92d8e6bd61c20aa916133dca2e3dbe0215270faf53
2
 
3
- RUN --mount=target=/root/packages.txt,source=packages.txt sed -i 's http://deb.debian.org http://cdn-aws.deb.debian.org g' /etc/apt/sources.list && sed -i 's http://archive.ubuntu.com http://us-east-1.ec2.archive.ubuntu.com g' /etc/apt/sources.list && sed -i '/security/d' /etc/apt/sources.list && apt-get update && xargs -r -a /root/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
4
 
5
- RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.12.1" "protobuf<4" "click<8.1"
6
 
7
- WORKDIR /home/user/app
8
 
9
- RUN sed -i 's http://deb.debian.org http://cdn-aws.deb.debian.org g' /etc/apt/sources.list && sed -i 's http://archive.ubuntu.com http://us-east-1.ec2.archive.ubuntu.com g' /etc/apt/sources.list && sed -i '/security/d' /etc/apt/sources.list && apt-get update && apt-get install -y git git-lfs ffmpeg libsm6 libxext6 cmake libgl1-mesa-glx && rm -rf /var/lib/apt/lists/* && git lfs install
10
 
11
- RUN pip install --no-cache-dir Cython "gradio==3.28.3" "torch==1.10.1"
12
-
13
- RUN git clone --recurse-submodules https://github.com/thu-coai/DA-Transformer.git && git checkout demo && pip install -e .
14
-
15
- RUN cd dag_search && python3 setup.py build_ext --inplace && pip install -e .
16
-
17
- USER user
18
-
19
- COPY --link --chown=1000 --from=lfs /app /home/user/app
20
-
21
- COPY --link --chown=1000 ./ /home/user/app
22
-
23
- CMD ["python3", "app.py"]
 
1
+ FROM python:3.9
2
 
3
+ WORKDIR /code
4
 
5
+ COPY ./requirements.txt /code/requirements.txt
6
 
7
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
8
 
9
+ COPY . .
10
 
11
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
 
 
 
 
 
 
 
 
 
 
README.md CHANGED
@@ -1,11 +1,12 @@
1
  ---
2
  title: DA-Transformer
3
- emoji: 😻
4
  colorFrom: red
5
- colorTo: gray
6
  sdk: docker
7
  pinned: false
8
  license: apache-2.0
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
  title: DA-Transformer
3
+ emoji:
4
  colorFrom: red
5
+ colorTo: orange
6
  sdk: docker
7
  pinned: false
8
  license: apache-2.0
9
  ---
10
 
11
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12
+