Spaces:
Sleeping
Sleeping
File size: 612 Bytes
316c983 f56e7a6 fcbef39 f56e7a6 fcbef39 316c983 fcbef39 316c983 f56e7a6 316c983 fcbef39 316c983 f56e7a6 316c983 f56e7a6 | 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 | FROM openjdk:17-slim
# Install python3, pip, procps, redis-server
RUN apt-get update && \
apt-get install -y python3 python3-pip procps redis-server && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Copy dependencies
COPY requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt
# Copy code
COPY . .
# Create runner directory
RUN mkdir -p runner && chmod 700 runner
# Expose FastAPI and Redis ports
EXPOSE 7860 6379
# Start Redis in background, RQ worker, then FastAPI
CMD redis-server --daemonize yes && \
rq worker & \
uvicorn main:app --host 0.0.0.0 --port 7860 --workers 1
|