Spaces:
Runtime error
Runtime error
Upload Dockerfile with huggingface_hub
Browse files- Dockerfile +7 -7
Dockerfile
CHANGED
@@ -14,14 +14,14 @@ RUN mkdir -p /app && chown -R user:user /app
|
|
14 |
# Switch to the non-root user
|
15 |
USER user
|
16 |
|
17 |
-
# Git configuration at user level
|
18 |
-
RUN git config --global --add safe.directory /app && git config --global user.email "[email protected]" && git config --global user.name "HF Space User"
|
19 |
-
|
20 |
# Clone the repository
|
21 |
RUN git clone https://github.com/Daanworg/cloud-rag-webhook.git /app
|
22 |
|
23 |
-
#
|
24 |
-
RUN
|
|
|
|
|
|
|
25 |
|
26 |
# Expose the port the app runs on
|
27 |
EXPOSE 7860
|
@@ -29,5 +29,5 @@ EXPOSE 7860
|
|
29 |
# Set environment variables
|
30 |
ENV PORT=7860
|
31 |
|
32 |
-
# Command to run the app
|
33 |
-
CMD ["python", "
|
|
|
14 |
# Switch to the non-root user
|
15 |
USER user
|
16 |
|
|
|
|
|
|
|
17 |
# Clone the repository
|
18 |
RUN git clone https://github.com/Daanworg/cloud-rag-webhook.git /app
|
19 |
|
20 |
+
# Create data directories
|
21 |
+
RUN mkdir -p /app/data/chunks /app/data/uploads /app/data/vectors
|
22 |
+
|
23 |
+
# Install HF-specific dependencies
|
24 |
+
RUN pip install --no-cache-dir -U transformers datasets sentence-transformers faiss-cpu gradio torch
|
25 |
|
26 |
# Expose the port the app runs on
|
27 |
EXPOSE 7860
|
|
|
29 |
# Set environment variables
|
30 |
ENV PORT=7860
|
31 |
|
32 |
+
# Command to run the app (we'll use placeholder until we create hf_app.py)
|
33 |
+
CMD ["python", "-c", "import gradio as gr; demo = gr.Interface(fn=lambda x: f'Setup in progress. Check back soon! {x}', inputs='text', outputs='text', title='RAG Document Processing'); demo.launch(server_name='0.0.0.0', server_port=7860)"]
|