ojaskittur commited on
Commit
6a99b17
·
1 Parent(s): 08080e4

Replace template with scoring system code

Browse files
Files changed (1) hide show
  1. Dockerfile +5 -9
Dockerfile CHANGED
@@ -1,29 +1,25 @@
1
- # Use Python 3.11 (matches your local setup)
2
  FROM python:3.11-slim
3
 
4
- # Set the working directory
5
  WORKDIR /app
6
 
7
- # 1. Install Java (System dependency for language-tool)
8
- # We do this manually here because packages.txt is ignored in Docker spaces
9
  RUN apt-get update && \
10
  apt-get install -y openjdk-17-jdk-headless && \
11
  rm -rf /var/lib/apt/lists/*
12
 
13
- # 2. Copy all your files into the container
14
  COPY . .
15
 
16
- # 3. Install Python libraries
17
  RUN pip install --no-cache-dir -r requirements.txt
18
 
19
- # 4. Create a specific user (Hugging Face requirement for security)
20
  RUN useradd -m -u 1000 user
21
  USER user
22
  ENV HOME=/home/user \
23
  PATH=/home/user/.local/bin:$PATH
24
 
25
- # 5. Expose port 7860 (Hugging Face specifically listens on this port)
26
  EXPOSE 7860
27
 
28
- # 6. Run Streamlit pointing to that specific port
29
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
 
 
1
  FROM python:3.11-slim
2
 
 
3
  WORKDIR /app
4
 
5
+ # Install Java
 
6
  RUN apt-get update && \
7
  apt-get install -y openjdk-17-jdk-headless && \
8
  rm -rf /var/lib/apt/lists/*
9
 
10
+ # Copy files
11
  COPY . .
12
 
13
+ # Install dependencies
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
16
+ # Setup user permissions (HF Security Requirement)
17
  RUN useradd -m -u 1000 user
18
  USER user
19
  ENV HOME=/home/user \
20
  PATH=/home/user/.local/bin:$PATH
21
 
 
22
  EXPOSE 7860
23
 
24
+ # Run Streamlit on port 7860
25
  CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]