Spaces:
Sleeping
Sleeping
init files
Browse files- Dockerfile +22 -0
- README.md +1 -0
- app.py +7 -0
- requirements.txt +7 -0
- tests.sh +1 -0
Dockerfile
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM nvidia/cuda:11.7.1-base-ubuntu22.04
|
2 |
+
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && rm -rf /var/lib/apt/lists/*
|
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 |
+
RUN useradd -m -u 1000 user
|
11 |
+
|
12 |
+
USER user
|
13 |
+
|
14 |
+
ENV HOME=/home/user \
|
15 |
+
PATH=/home/user/.local/bin:$PATH
|
16 |
+
|
17 |
+
WORKDIR $HOME/app
|
18 |
+
|
19 |
+
COPY --chown=user . $HOME/app
|
20 |
+
RUN chmod +x tests.sh
|
21 |
+
RUN tests.sh
|
22 |
+
CMD ["python", "app.py"]
|
README.md
CHANGED
@@ -4,6 +4,7 @@ emoji: 📊
|
|
4 |
colorFrom: red
|
5 |
colorTo: red
|
6 |
sdk: docker
|
|
|
7 |
pinned: false
|
8 |
---
|
9 |
|
|
|
4 |
colorFrom: red
|
5 |
colorTo: red
|
6 |
sdk: docker
|
7 |
+
app_port: 7860
|
8 |
pinned: false
|
9 |
---
|
10 |
|
app.py
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import subprocess
|
2 |
+
|
3 |
+
input_user = ""
|
4 |
+
while input_user != "Q":
|
5 |
+
if input_user:
|
6 |
+
(subprocess.run(input_user.rstrip(), capture_output=True).stdout)
|
7 |
+
input_user = input()
|
requirements.txt
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
streamlit==1.20.*
|
2 |
+
requests==2.27.*
|
3 |
+
sentencepiece==0.1.*
|
4 |
+
torch==2.*
|
5 |
+
transformers==4.*
|
6 |
+
uvicorn[standard]==0.17.*
|
7 |
+
xformers==0.0.19
|
tests.sh
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
echo "running tests"
|