File size: 522 Bytes
cd583ae
7a5aa35
 
cd583ae
 
 
 
 
7a5aa35
 
 
cd583ae
 
7a5aa35
 
cd583ae
 
 
 
 
7a5aa35
cd583ae
cc0a646
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Use official Bun base image
FROM oven/bun:1.0.30

# Create non-root user like Hugging Face expects
RUN adduser --disabled-password --gecos "" user
USER user
ENV PATH="/home/user/.bun/bin:$PATH"

# Set working directory
WORKDIR /app

# Copy only dependencies first for caching
COPY --chown=user bun.lockb bunfig.toml ./
RUN bun install

# Copy the rest of the code
COPY --chown=user . .

# Port Hugging Face expects
EXPOSE 7860

# Run the server (make sure your script listens on port 7860)
CMD ["bun", "./src/index.ts"]