File size: 727 Bytes
5ef3f54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Use the official FalkorDB image as the base
FROM falkordb/falkordb:latest

# Install Python and dependencies
USER root
RUN apt-get update && apt-get install -y python3 python3-pip python3-venv

# Set up a virtual environment to avoid PEP 668 error
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# Set up a working directory
WORKDIR /app

# Copy the requirements file and install dependencies
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Copy the application code
COPY . .

# Use the separate start.sh script
RUN chmod +x /app/start.sh

# Expose the port used by Hugging Face Spaces
EXPOSE 7860

# Reset entrypoint and run the startup script
ENTRYPOINT []
CMD ["/app/start.sh"]