Spaces:
Sleeping

File size: 851 Bytes
7414ed3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
32
33
34
35
36
37
FROM debian:bullseye-slim

# Install system dependencies
# We install curl, jq, socat, gzip as required by start.sh
# ca-certificates is needed for curl to verify SSL
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
    curl \
    jq \
    socat \
    gzip \
    ca-certificates \
    && rm -rf /var/lib/apt/lists/*

# Set up a working directory
WORKDIR /app

# Copy all files from the current directory to /app
COPY . /app

# Ensure start.sh is executable
RUN chmod +x start.sh

# Create a non-root user (Hugging Face Spaces default user ID is 1000)
RUN useradd -m -u 1000 user
# Change ownership of the app directory to the user
RUN chown -R user:user /app

# Switch to the non-root user
USER user

# Expose the port expected by Hugging Face Spaces
EXPOSE 7860

# Define the command to run the application
CMD ["./start.sh"]