Sayed223 commited on
Commit
2fb2c0e
·
verified ·
1 Parent(s): 6aff280

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -6
Dockerfile CHANGED
@@ -1,5 +1,4 @@
1
- # CustomerSupportEnv — Dockerfile
2
- # Compatible with Hugging Face Spaces (port 7860)
3
  # Build: docker build -t customer-support-env .
4
  # Run: docker run -p 7860:7860 customer-support-env
5
 
@@ -8,9 +7,10 @@ FROM python:3.11-slim
8
  LABEL maintainer="openenv-submission"
9
  LABEL description="CustomerSupportEnv — OpenEnv-compatible customer support RL environment"
10
 
11
- # System deps
12
  RUN apt-get update && apt-get install -y --no-install-recommends \
13
  curl \
 
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
  WORKDIR /app
@@ -19,17 +19,18 @@ WORKDIR /app
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
- # Copy source
23
  COPY . .
24
 
25
  # Create non-root user (HF Spaces requirement)
26
  RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
27
  USER appuser
28
 
29
- # Health check
30
  HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
31
  CMD curl -f http://localhost:7860/health || exit 1
32
 
33
  EXPOSE 7860
34
 
35
- CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
+ # CustomerSupportEnv — OpenEnv-Compatible Docker Image
 
2
  # Build: docker build -t customer-support-env .
3
  # Run: docker run -p 7860:7860 customer-support-env
4
 
 
7
  LABEL maintainer="openenv-submission"
8
  LABEL description="CustomerSupportEnv — OpenEnv-compatible customer support RL environment"
9
 
10
+ # System dependencies
11
  RUN apt-get update && apt-get install -y --no-install-recommends \
12
  curl \
13
+ gcc \
14
  && rm -rf /var/lib/apt/lists/*
15
 
16
  WORKDIR /app
 
19
  COPY requirements.txt .
20
  RUN pip install --no-cache-dir -r requirements.txt
21
 
22
+ # Copy source code
23
  COPY . .
24
 
25
  # Create non-root user (HF Spaces requirement)
26
  RUN useradd -m -u 1000 appuser && chown -R appuser:appuser /app
27
  USER appuser
28
 
29
+ # Health check (checks FastAPI /health endpoint)
30
  HEALTHCHECK --interval=30s --timeout=10s --start-period=15s --retries=3 \
31
  CMD curl -f http://localhost:7860/health || exit 1
32
 
33
  EXPOSE 7860
34
 
35
+ # Run the FastAPI server
36
+ CMD ["python", "server.py"]