Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
furkmak authored Oct 15, 2024
1 parent 1e187e0 commit 4c22fec
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
FROM python:3.10
# Use a base image that includes PyTorch
FROM pytorch/pytorch:2.1.0-cuda11.8-cudnn8-runtime

# Set the working directory
WORKDIR /app

# Copy only the requirements file first
COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt
# Upgrade pip and install dependencies
RUN pip install --no-cache-dir --upgrade pip setuptools wheel && \
pip install --no-cache-dir -r requirements.txt

# Create a directory to store the downloaded model
RUN mkdir -p /app/models
Expand All @@ -21,7 +26,7 @@ COPY fine_tuned_legalqa ./fine_tuned_legalqa
COPY . .

# Expose the port that Uvicorn runs on
EXPOSE 8080
EXPOSE 8000

# Run the application with Uvicorn
CMD ["uvicorn", "fastapp:app", "--host", "0.0.0.0", "--port", "8080"]
CMD ["uvicorn", "fastapp:app", "--host", "0.0.0.0", "--port", "8000"]

0 comments on commit 4c22fec

Please sign in to comment.