HoangDaoAI commited on
Commit
149f9b6
·
verified ·
1 Parent(s): 1fc5ec5

fix dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -5
Dockerfile CHANGED
@@ -30,15 +30,20 @@ ENV PATH=/root/.local/bin:$PATH
30
  # Copy application code
31
  COPY ./app ./app
32
 
33
- COPY ./app ./app
 
34
 
35
- # Copy model file into container
36
- COPY ./models ./app/models
 
 
 
 
37
 
38
  # Set environment variables
39
  ENV PYTHONUNBUFFERED=1
40
  ENV PYTHONDONTWRITEBYTECODE=1
41
- ENV MODEL_PATH=/app/models/PhoBERTFineTuned_best.pth
42
 
43
  # Expose port
44
  EXPOSE 7860
@@ -48,4 +53,4 @@ HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
48
  CMD python -c "import requests; requests.get('http://localhost:7860/api/v1/health')"
49
 
50
  # Run the application
51
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
30
  # Copy application code
31
  COPY ./app ./app
32
 
33
+ # Copy models directory with all files
34
+ COPY ./models ./models
35
 
36
+ # Debug: List files to verify
37
+ RUN echo "=== Checking models directory ===" && \
38
+ ls -la ./models/ && \
39
+ echo "=== Current directory ===" && \
40
+ pwd && \
41
+ ls -la
42
 
43
  # Set environment variables
44
  ENV PYTHONUNBUFFERED=1
45
  ENV PYTHONDONTWRITEBYTECODE=1
46
+ ENV MODEL_PATH=./models/PhoBERTFineTuned_best.pth
47
 
48
  # Expose port
49
  EXPOSE 7860
 
53
  CMD python -c "import requests; requests.get('http://localhost:7860/api/v1/health')"
54
 
55
  # Run the application
56
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]