Spaces:
Sleeping
Sleeping
Fabio Grasso
commited on
Commit
·
48a5b6e
1
Parent(s):
d96c042
fix: use tmp with permission
Browse files- Dockerfile +3 -4
- app/main.py +2 -2
Dockerfile
CHANGED
|
@@ -1,17 +1,16 @@
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
| 3 |
-
WORKDIR /src
|
| 4 |
|
| 5 |
RUN pip install --user --upgrade pip
|
| 6 |
|
| 7 |
RUN apt-get update && apt-get install -y ffmpeg
|
| 8 |
|
| 9 |
-
COPY
|
| 10 |
-
|
| 11 |
|
| 12 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 13 |
|
| 14 |
-
|
|
|
|
| 15 |
|
| 16 |
ENV PYTHONPATH "${PYTHONPATH}:/app"
|
| 17 |
|
|
|
|
| 1 |
FROM python:3.9
|
| 2 |
|
|
|
|
| 3 |
|
| 4 |
RUN pip install --user --upgrade pip
|
| 5 |
|
| 6 |
RUN apt-get update && apt-get install -y ffmpeg
|
| 7 |
|
| 8 |
+
COPY . .
|
|
|
|
| 9 |
|
| 10 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 11 |
|
| 12 |
+
RUN mkdir -p /tmq
|
| 13 |
+
RUN chmod 777 /tmp
|
| 14 |
|
| 15 |
ENV PYTHONPATH "${PYTHONPATH}:/app"
|
| 16 |
|
app/main.py
CHANGED
|
@@ -41,8 +41,8 @@ def find_files(in_path):
|
|
| 41 |
out.append(file)
|
| 42 |
return out
|
| 43 |
|
| 44 |
-
out_path = Path("
|
| 45 |
-
in_path = Path("
|
| 46 |
|
| 47 |
# def clean_folders():
|
| 48 |
# if in_path.exists():
|
|
|
|
| 41 |
out.append(file)
|
| 42 |
return out
|
| 43 |
|
| 44 |
+
out_path = Path("tmp")
|
| 45 |
+
in_path = Path("tmp")
|
| 46 |
|
| 47 |
# def clean_folders():
|
| 48 |
# if in_path.exists():
|