wenmeng zhou commited on
Commit
4d24d7c
1 Parent(s): 89ff51b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +4 -6
Dockerfile CHANGED
@@ -1,26 +1,24 @@
1
  FROM registry.us-west-1.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda11.8.0-py310-torch2.1.0-tf2.14.0-1.10.0
2
  ENV DEBIAN_FRONTEND=noninteractive
3
- RUN apt-get update && \
4
- apt-get upgrade -y && \
5
- apt-get install -y --no-install-recommends
6
 
7
  RUN useradd -m -u 1000 user
8
  USER user
9
  ENV HOME=/home/user \
10
  PATH=/home/user/.local/bin:${PATH}
 
11
  WORKDIR ${HOME}/app
12
 
13
  COPY --chown=1000 ./requirements.txt /tmp/requirements.txt
14
  RUN pip install -r /tmp/requirements.txt
15
 
16
  COPY --chown=1000 . ${HOME}/app
17
- RUN chown -R user:users /mnt/workspace/
18
 
19
- ENV PYTHONPATH=${HOME}/app \
 
20
  PYTHONUNBUFFERED=1 \
21
  GRADIO_ALLOW_FLAGGING=never \
22
  GRADIO_NUM_PORTS=1 \
23
  GRADIO_SERVER_NAME=0.0.0.0 \
24
  GRADIO_THEME=huggingface \
25
  SYSTEM=spaces
26
- CMD ["python", "app.py"]
 
1
  FROM registry.us-west-1.aliyuncs.com/modelscope-repo/modelscope:ubuntu22.04-cuda11.8.0-py310-torch2.1.0-tf2.14.0-1.10.0
2
  ENV DEBIAN_FRONTEND=noninteractive
 
 
 
3
 
4
  RUN useradd -m -u 1000 user
5
  USER user
6
  ENV HOME=/home/user \
7
  PATH=/home/user/.local/bin:${PATH}
8
+
9
  WORKDIR ${HOME}/app
10
 
11
  COPY --chown=1000 ./requirements.txt /tmp/requirements.txt
12
  RUN pip install -r /tmp/requirements.txt
13
 
14
  COPY --chown=1000 . ${HOME}/app
 
15
 
16
+ ENV MODELSCOPE_CACHE=${HOME}/app
17
+ PYTHONPATH=${HOME}/app \
18
  PYTHONUNBUFFERED=1 \
19
  GRADIO_ALLOW_FLAGGING=never \
20
  GRADIO_NUM_PORTS=1 \
21
  GRADIO_SERVER_NAME=0.0.0.0 \
22
  GRADIO_THEME=huggingface \
23
  SYSTEM=spaces
24
+ CMD ["pwd && ls . &&", "python", "app.py"]