Spaces:
Runtime error
Runtime error
littlebird13
commited on
Commit
•
b2f15df
1
Parent(s):
8653180
Create Dockerfile
Browse files- Dockerfile +25 -0
Dockerfile
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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}/cache \
|
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 |
+
RUN mkdir -p /home/user/.cache/modelscope/modelscope_modules/ && touch /home/user/.cache/modelscope/modelscope_modules/__init__.py
|
25 |
+
CMD ["python", "app.py"]
|