peace4ever commited on
Commit
1fd28e5
·
verified ·
1 Parent(s): d4d11d3

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -18
Dockerfile CHANGED
@@ -1,32 +1,32 @@
1
  # # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
  # # you will also find guides on how best to write your Dockerfile
3
 
4
- # FROM python:3.9
5
 
6
- # WORKDIR /code
7
 
8
- # COPY ./requirements.txt /code/requirements.txt
9
 
10
- # RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
 
12
- # COPY . .
13
 
14
- # CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "peace4ever-peace4ever/software-project-Sentiment_Analysis.hf.space"]
15
  # Base image (replace with a suitable Python image)
16
- FROM python:3.9
17
 
18
- # Create work directory
19
- WORKDIR /app
20
 
21
- # Copy requirements (excluding tkinter)
22
- COPY requirements.txt .
23
- RUN pip install --no-cache-dir --upgrade -r requirements.txt
24
 
25
- # Copy your application code
26
- COPY app.py . # Replace with your main script name (containing Flask app)
27
 
28
- # Expose port (optional)
29
- EXPOSE 5000
30
 
31
- # Command to run your Flask app
32
- CMD ["flask", "run", "--host", "0.0.0.0"]
 
1
  # # read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker
2
  # # you will also find guides on how best to write your Dockerfile
3
 
4
+ FROM python:3.9
5
 
6
+ WORKDIR /code
7
 
8
+ COPY ./requirements.txt /code/requirements.txt
9
 
10
+ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
11
 
12
+ COPY app.py .
13
 
14
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--allow-websocket-origin", "peace4ever-peace4ever/software-project-Sentiment_Analysis.hf.space"]
15
  # Base image (replace with a suitable Python image)
16
+ # FROM python:3.9
17
 
18
+ # # Create work directory
19
+ # WORKDIR /app
20
 
21
+ # # Copy requirements (excluding tkinter)
22
+ # COPY requirements.txt .
23
+ # RUN pip install --no-cache-dir --upgrade -r requirements.txt
24
 
25
+ # # Copy your application code
26
+ # COPY app.py . # Replace with your main script name (containing Flask app)
27
 
28
+ # # Expose port (optional)
29
+ # EXPOSE 5000
30
 
31
+ # # Command to run your Flask app
32
+ # CMD ["flask", "run", "--host", "0.0.0.0"]