sashdev commited on
Commit
6f09007
·
verified ·
1 Parent(s): 4d744a4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -19
Dockerfile CHANGED
@@ -1,26 +1,20 @@
1
- # Use a base image with Python
2
  FROM python:3.9
3
 
4
- # Install Java (required for language-tool-python)
5
- RUN apt-get update && apt-get install -y openjdk-11-jdk
6
 
7
- # Set JAVA_HOME environment variable
8
- ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
9
- ENV PATH=$JAVA_HOME/bin:$PATH
10
-
11
- # Create a non-root user
12
- RUN useradd -m -u 1000 user
13
- USER user
14
-
15
- # Set the working directory
16
  WORKDIR /app
17
 
18
- # Copy the requirements.txt file and install dependencies
19
- COPY --chown=user requirements.txt .
20
- RUN pip install --no-cache-dir -r requirements.txt
 
 
 
21
 
22
- # Copy the entire application code
23
- COPY --chown=user . .
24
 
25
- # Command to run the app
26
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
 
1
  FROM python:3.9
2
 
3
+ # Install Java
4
+ RUN apt-get update && apt-get install -y default-jdk
5
 
6
+ # Set up working directory
 
 
 
 
 
 
 
 
7
  WORKDIR /app
8
 
9
+ # Copy requirements and install dependencies
10
+ COPY requirements.txt .
11
+ RUN pip install -r requirements.txt
12
+
13
+ # Copy the application code
14
+ COPY . .
15
 
16
+ # Download SpaCy model
17
+ RUN python -m spacy download en_core_web_sm
18
 
19
+ # Set the command to run the application
20
+ CMD ["python", "app.py"]