Spaces:
Running
on
Zero
Running
on
Zero
Stanislaw Szymanowicz
commited on
Commit
•
a6ee7fc
1
Parent(s):
e868ed2
Revert "Try docker container"
Browse filesThis reverts commit e868ed2aa9dc2c1cc363d1d3c2563315d93de578.
- Dockerfile +0 -42
- pre-requirements.txt +3 -0
- requirements.txt +0 -2
Dockerfile
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
FROM nvidia/cuda:12.1.1-cudnn8-devel-ubuntu22.04
|
2 |
-
|
3 |
-
ARG DEBIAN_FRONTEND=noninteractive
|
4 |
-
|
5 |
-
ENV PYTHONUNBUFFERED=1
|
6 |
-
|
7 |
-
RUN apt-get update && apt-get install --no-install-recommends -y \
|
8 |
-
build-essential \
|
9 |
-
python3.9 \
|
10 |
-
python3-pip \
|
11 |
-
git \
|
12 |
-
ffmpeg \
|
13 |
-
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
14 |
-
|
15 |
-
WORKDIR /code
|
16 |
-
|
17 |
-
COPY ./requirements.txt /code/requirements.txt
|
18 |
-
|
19 |
-
# Set up a new user named "user" with user ID 1000
|
20 |
-
RUN useradd -m -u 1000 user
|
21 |
-
# Switch to the "user" user
|
22 |
-
USER user
|
23 |
-
# Set home to the user's home directory
|
24 |
-
ENV HOME=/home/user \
|
25 |
-
PATH=/home/user/.local/bin:$PATH \
|
26 |
-
PYTHONPATH=$HOME/app \
|
27 |
-
PYTHONUNBUFFERED=1 \
|
28 |
-
GRADIO_ALLOW_FLAGGING=never \
|
29 |
-
GRADIO_NUM_PORTS=1 \
|
30 |
-
GRADIO_SERVER_NAME=0.0.0.0 \
|
31 |
-
GRADIO_THEME=huggingface \
|
32 |
-
SYSTEM=spaces
|
33 |
-
|
34 |
-
RUN pip3 install --no-cache-dir --upgrade -r /code/requirements.txt
|
35 |
-
|
36 |
-
# Set the working directory to the user's home directory
|
37 |
-
WORKDIR $HOME/app
|
38 |
-
|
39 |
-
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
40 |
-
COPY --chown=user . $HOME/app
|
41 |
-
|
42 |
-
CMD ["python3", "app.py"]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
pre-requirements.txt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
--extra-index-url https://download.pytorch.org/whl/cu113
|
2 |
+
torch==1.13.0+cu113
|
3 |
+
torchvision==0.14.0+cu113
|
requirements.txt
CHANGED
@@ -1,5 +1,3 @@
|
|
1 |
-
torch==1.13.0
|
2 |
-
torchvision==0.14.0
|
3 |
tqdm
|
4 |
hydra-core
|
5 |
omegaconf
|
|
|
|
|
|
|
1 |
tqdm
|
2 |
hydra-core
|
3 |
omegaconf
|