Pendrokar commited on
Commit
b555d0d
β€’
1 Parent(s): b5bc9a6

Dockerfile: test default config

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -21
Dockerfile CHANGED
@@ -1,27 +1,11 @@
1
  FROM python:3.9
2
 
3
- RUN --mount=target=pre-requirements.txt,source=pre-requirements.txt pip install --no-cache-dir -r pre-requirements.txt
4
 
5
- RUN pip install --no-cache-dir pip==22.3.1 && pip install --no-cache-dir datasets "huggingface-hub>=0.19" "hf-transfer>=0.1.4" "protobuf<4" "click<8.1" "pydantic~=1.0"
6
 
7
- RUN pip install --no-cache-dir gradio[oauth]==4.18.0 "uvicorn>=0.14.0" spaces
8
 
9
- RUN useradd -m -u 1000 user
10
 
11
- RUN 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
12
-
13
- RUN --mount=target=requirements.txt,source=requirements.txt pip install --no-cache-dir -r requirements.txt
14
-
15
- COPY --link --chown=1000 --from=lfs /app /home/user/app
16
-
17
- WORKDIR /home/user/app
18
-
19
- RUN --mount=target=/root/packages.txt,source=packages.txt apt-get update && xargs -r -a /root/packages.txt apt-get install -y && rm -rf /var/lib/apt/lists/*
20
-
21
- RUN pip freeze > /tmp/freeze.txt
22
-
23
- COPY --link --chown=1000 ./ /home/user/app
24
-
25
- COPY --from=pipfreeze --link --chown=1000 /tmp/freeze.txt .
26
-
27
- CMD ["python", "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"]