Spaces:
Paused
Paused
Commit
·
2d14b4d
1
Parent(s):
265fc3e
Add requirements.txt and initial Docker Space files
Browse files- Dockerfile +3 -5
- requirements.txt +8 -7
Dockerfile
CHANGED
|
@@ -9,7 +9,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 9 |
|
| 10 |
# Create writable directories
|
| 11 |
RUN mkdir -p /data/hf_cache /data/transformers_cache /data/nltk_data /data/audio
|
| 12 |
-
RUN chmod -R 777 /
|
| 13 |
|
| 14 |
# Set environment variables
|
| 15 |
ENV HF_HOME=/data/hf_cache
|
|
@@ -20,9 +20,7 @@ ENV AUDIO_FOLDER=/data/audio
|
|
| 20 |
# Copy source
|
| 21 |
COPY . .
|
| 22 |
|
| 23 |
-
|
| 24 |
-
EXPOSE 7860
|
| 25 |
-
CMD ["python", "app.py"]
|
| 26 |
|
| 27 |
# Run via a production WSGI server (you can also use gunicorn or waitress)
|
| 28 |
-
CMD ["waitress-serve", "--
|
|
|
|
| 9 |
|
| 10 |
# Create writable directories
|
| 11 |
RUN mkdir -p /data/hf_cache /data/transformers_cache /data/nltk_data /data/audio
|
| 12 |
+
RUN chmod -R 777 static/audio
|
| 13 |
|
| 14 |
# Set environment variables
|
| 15 |
ENV HF_HOME=/data/hf_cache
|
|
|
|
| 20 |
# Copy source
|
| 21 |
COPY . .
|
| 22 |
|
| 23 |
+
EXPOSE 5000
|
|
|
|
|
|
|
| 24 |
|
| 25 |
# Run via a production WSGI server (you can also use gunicorn or waitress)
|
| 26 |
+
CMD ["waitress-serve", "--listen=0.0.0.0:5000", "app:app"]
|
requirements.txt
CHANGED
|
@@ -1,9 +1,10 @@
|
|
| 1 |
-
flask
|
| 2 |
-
|
| 3 |
-
nest_asyncio
|
| 4 |
-
transformers>=4.30
|
| 5 |
torch
|
|
|
|
| 6 |
deep-translator
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
soundfile
|
|
|
|
|
|
|
|
|
| 1 |
+
flask[async]
|
| 2 |
+
waitress
|
|
|
|
|
|
|
| 3 |
torch
|
| 4 |
+
transformers
|
| 5 |
deep-translator
|
| 6 |
+
nest_asyncio
|
| 7 |
+
flask-cors
|
| 8 |
+
soundfile
|
| 9 |
+
textblob
|
| 10 |
+
malaya
|