Spaces:
Sleeping
Sleeping
updates
Browse files- Dockerfile +9 -3
- requirements.txt +4 -4
Dockerfile
CHANGED
@@ -14,6 +14,10 @@ COPY ./requirements.txt /code/requirements.txt
|
|
14 |
|
15 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
16 |
|
|
|
|
|
|
|
|
|
17 |
# Set up a new user named "user" with user ID 1000
|
18 |
RUN useradd -m -u 1000 user
|
19 |
|
@@ -30,12 +34,14 @@ WORKDIR $HOME/app
|
|
30 |
COPY --chown=user . $HOME/app
|
31 |
|
32 |
# Download and uzip truepic-size from Google Drive
|
33 |
-
RUN gdown
|
34 |
-
RUN
|
|
|
|
|
35 |
RUN chmod +x truepic-sign
|
36 |
|
37 |
WORKDIR $HOME/app
|
38 |
|
39 |
# COPY . .
|
40 |
|
41 |
-
CMD ["
|
|
|
14 |
|
15 |
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
16 |
|
17 |
+
RUN pip install diffusers transformers accelerate scipy safetensors
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
# Set up a new user named "user" with user ID 1000
|
22 |
RUN useradd -m -u 1000 user
|
23 |
|
|
|
34 |
COPY --chown=user . $HOME/app
|
35 |
|
36 |
# Download and uzip truepic-size from Google Drive
|
37 |
+
RUN pip install gdown
|
38 |
+
RUN --mount=type=secret,id=truepic_sign_gdoc_id,mode=0444,required=true \
|
39 |
+
gdown --id $(cat /run/secrets/truepic_sign_gdoc_id)
|
40 |
+
RUN tar -xf truepic-sign-v0.2.0-ubuntu-20.04.tar.gz
|
41 |
RUN chmod +x truepic-sign
|
42 |
|
43 |
WORKDIR $HOME/app
|
44 |
|
45 |
# COPY . .
|
46 |
|
47 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
requirements.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
fastapi==0.74.*
|
2 |
requests==2.27.*
|
|
|
3 |
torch==1.11.*
|
4 |
transformers==4.*
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
gdown
|
|
|
1 |
fastapi==0.74.*
|
2 |
requests==2.27.*
|
3 |
+
sentencepiece==0.1.*
|
4 |
torch==1.11.*
|
5 |
transformers==4.*
|
6 |
+
uvicorn[standard]==0.17.*
|
7 |
+
--extra-index-url https://download.pytorch.org/whl/cu113
|
8 |
+
torch
|
|