PanagiotisMark commited on
Commit
895589c
1 Parent(s): 00c7c1e

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +15 -24
Dockerfile CHANGED
@@ -1,32 +1,23 @@
1
- # Use the official Python image from the Docker Hub
2
- FROM python:3.9.19-slim
3
 
4
- # Create the app directory and change its ownership
5
- RUN mkdir /app && useradd -m -u 1000 user && chown -R user:user /app
6
-
7
- # Switch to the user
8
  USER user
9
-
10
- # Set environment variables
11
  ENV HOME=/home/user \
12
- PATH=/home/user/.local/bin:$PATH \
13
- PYTHONUNBUFFERED=1 \
14
- GRADIO_ALLOW_FLAGGING=never \
15
- GRADIO_NUM_PORTS=1 \
16
- GRADIO_SERVER_NAME=0.0.0.0 \
17
- SYSTEM=spaces
18
 
19
  # Set the working directory in the container
20
- WORKDIR /app
21
-
22
- # Copy the current directory contents into the container at /app
23
- COPY --chown=user:user . /app
24
 
25
- # Install any needed packages specified in requirements.txt
26
- RUN pip install --no-cache-dir -r requirements.txt
27
-
28
- # Expose the port the app runs on
29
  EXPOSE 7860
30
 
31
- # Run gradio_app.py when the container launches
32
- CMD ["python", "gradio_app.py"]
 
 
 
 
 
 
 
1
+ FROM intelligencenoborders/scinobo-claim-verification:latest
 
2
 
3
+ # Add user
4
+ RUN useradd -m -u 1000 user
5
+ RUN chown -R user /app
 
6
  USER user
 
 
7
  ENV HOME=/home/user \
8
+ PATH=/home/user/.local/bin:$PATH
 
 
 
 
 
9
 
10
  # Set the working directory in the container
11
+ WORKDIR /app/src
 
 
 
12
 
13
+ # Expose the port that Gradio will run on
 
 
 
14
  EXPOSE 7860
15
 
16
+ ENV PYTHONUNBUFFERED=1 \
17
+ GRADIO_ALLOW_FLAGGING=never \
18
+ GRADIO_NUM_PORTS=1 \
19
+ GRADIO_SERVER_NAME=0.0.0.0 \
20
+ SYSTEM=spaces
21
+
22
+ # Run app.py when the container launches
23
+ CMD ["python", "-m", "claim_analysis.server.gradio_app"]