Spaces:
Sleeping
Sleeping
Commit
·
82891c7
1
Parent(s):
0d50924
Add project files for HF Space
Browse files- Dockerfile +3 -0
- src/config.py +2 -1
Dockerfile
CHANGED
@@ -27,6 +27,9 @@ EXPOSE 7860
|
|
27 |
|
28 |
# Set the environment variable for the Ollama host when running inside Docker.
|
29 |
ENV OLLAMA_HOST=host.docker.internal
|
|
|
|
|
|
|
30 |
|
31 |
# Define the default command to run when the container starts
|
32 |
# Uses Python's module flag '-m' for correct package path resolution
|
|
|
27 |
|
28 |
# Set the environment variable for the Ollama host when running inside Docker.
|
29 |
ENV OLLAMA_HOST=host.docker.internal
|
30 |
+
ENV TRANSFORMERS_CACHE=/tmp/hf_cache
|
31 |
+
ENV HF_HOME=/tmp/hf_home
|
32 |
+
ENV XDG_CACHE_HOME=/tmp
|
33 |
|
34 |
# Define the default command to run when the container starts
|
35 |
# Uses Python's module flag '-m' for correct package path resolution
|
src/config.py
CHANGED
@@ -35,5 +35,6 @@ MAX_FILE_LENGTH_MINS = 15
|
|
35 |
ALLOWED_FILE_EXTENSIONS = [".mp3", ".wav", ".m4a", ".flac", ".ogg"]
|
36 |
|
37 |
# Logging Configuration
|
38 |
-
LOG_FILE_PATH = "logs
|
|
|
39 |
LOG_LEVEL = "INFO" # Can be "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
|
|
|
35 |
ALLOWED_FILE_EXTENSIONS = [".mp3", ".wav", ".m4a", ".flac", ".ogg"]
|
36 |
|
37 |
# Logging Configuration
|
38 |
+
LOG_FILE_PATH = os.path.join("/tmp", "logs", "app.log")
|
39 |
+
os.makedirs(os.path.dirname(LOG_FILE_PATH), exist_ok=True)
|
40 |
LOG_LEVEL = "INFO" # Can be "DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"
|