Spaces:
Sleeping
Sleeping
Updated Dockerfile for Hugging Face Spaces deployment
Browse files- Dockerfile +3 -7
Dockerfile
CHANGED
@@ -47,12 +47,8 @@ ENV LD_LIBRARY_PATH=${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}
|
|
47 |
# Set environment variable for NeMo cache directory
|
48 |
ENV NEMO_NLP_TMP=/app/.cache
|
49 |
|
50 |
-
# Create cache
|
51 |
-
RUN mkdir -p /app/.cache
|
52 |
-
|
53 |
-
# Set environment variable for Hugging Face cache directory
|
54 |
-
ENV HF_HOME=/app/.cache/huggingface
|
55 |
-
ENV TRANSFORMERS_CACHE=/app/.cache/huggingface
|
56 |
|
57 |
# Copy the setup script and requirements file into the container
|
58 |
COPY setup.sh requirements.txt /app/
|
@@ -101,4 +97,4 @@ EXPOSE 3000
|
|
101 |
ENV IN_DOCKER=True
|
102 |
|
103 |
# Run the FastAPI app and Node.js server
|
104 |
-
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port 8000 &
|
|
|
47 |
# Set environment variable for NeMo cache directory
|
48 |
ENV NEMO_NLP_TMP=/app/.cache
|
49 |
|
50 |
+
# Create cache directories with appropriate permissions
|
51 |
+
RUN mkdir -p /app/.cache/huggingface && chmod -R 777 /app/.cache
|
|
|
|
|
|
|
|
|
52 |
|
53 |
# Copy the setup script and requirements file into the container
|
54 |
COPY setup.sh requirements.txt /app/
|
|
|
97 |
ENV IN_DOCKER=True
|
98 |
|
99 |
# Run the FastAPI app and Node.js server
|
100 |
+
CMD ["sh", "-c", "uvicorn app:app --host 0.0.0.0 --port 8000 & /app/wait-for-it.sh --timeout=300 --strict http://0.0.0.0:8000/health -- node /app/app/server.js"]
|