Spaces:
Sleeping
Sleeping
Commit
·
de5862e
1
Parent(s):
873a169
update
Browse files- Dockerfile +5 -5
- requirements.txt +0 -0
Dockerfile
CHANGED
|
@@ -6,8 +6,8 @@ RUN useradd -m -u 1000 user
|
|
| 6 |
USER user
|
| 7 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 8 |
|
| 9 |
-
# Set
|
| 10 |
-
ENV
|
| 11 |
|
| 12 |
# Set working directory
|
| 13 |
WORKDIR /app
|
|
@@ -17,10 +17,10 @@ COPY --chown=user ./requirements.txt requirements.txt
|
|
| 17 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 18 |
|
| 19 |
# Create cache directory for Hugging Face and ensure permissions
|
| 20 |
-
RUN mkdir -p /app/
|
| 21 |
|
| 22 |
# Copy the rest of the application files
|
| 23 |
COPY --chown=user . /app
|
| 24 |
|
| 25 |
-
# Use
|
| 26 |
-
CMD ["
|
|
|
|
| 6 |
USER user
|
| 7 |
ENV PATH="/home/user/.local/bin:$PATH"
|
| 8 |
|
| 9 |
+
# Set Hugging Face cache directory
|
| 10 |
+
ENV HF_HOME=/app/hf_cache
|
| 11 |
|
| 12 |
# Set working directory
|
| 13 |
WORKDIR /app
|
|
|
|
| 17 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
| 18 |
|
| 19 |
# Create cache directory for Hugging Face and ensure permissions
|
| 20 |
+
RUN mkdir -p /app/hf_cache && chown user:user /app/hf_cache
|
| 21 |
|
| 22 |
# Copy the rest of the application files
|
| 23 |
COPY --chown=user . /app
|
| 24 |
|
| 25 |
+
# Use Gunicorn to serve the Flask app
|
| 26 |
+
CMD ["gunicorn", "--bind", "0.0.0.0:7860", "chatbot:app"]
|
requirements.txt
CHANGED
|
Binary files a/requirements.txt and b/requirements.txt differ
|
|
|