Elaineyy commited on
Commit
ce2665b
·
verified ·
1 Parent(s): 351eb5f

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -8
Dockerfile CHANGED
@@ -1,17 +1,17 @@
1
- # Use Python as base image
2
  FROM python:3.10
3
 
4
- # Set working directory
5
  WORKDIR /app
6
 
7
- # Copy project files
8
- COPY . /app
9
 
10
- # Install dependencies
11
- RUN pip install --no-cache-dir fastapi uvicorn torch torchvision torchaudio transformers sentencepiece accelerate
12
 
13
- # Expose port 7860 for FastAPI
14
  EXPOSE 7860
15
 
16
- # Start the FastAPI server
17
  CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Use an official Python runtime as the base image
2
  FROM python:3.10
3
 
4
+ # Set the working directory in the container
5
  WORKDIR /app
6
 
7
+ # Copy the FastAPI application code
8
+ COPY server.py /app/server.py
9
 
10
+ # Install necessary dependencies
11
+ RUN pip install --no-cache-dir fastapi uvicorn transformers torch sentencepiece
12
 
13
+ # Expose the FastAPI port
14
  EXPOSE 7860
15
 
16
+ # Run the FastAPI server
17
  CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "7860"]