Imsachin010 commited on
Commit
a2ebce0
·
1 Parent(s): 1c1d77b

Revert Dockerfile to serve web app instead of training (per professor's advice)

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -5
Dockerfile CHANGED
@@ -24,12 +24,9 @@ COPY training/ ./training/
24
  COPY run_hf_training.sh ./run_hf_training.sh
25
  RUN sed -i 's/\r$//' ./run_hf_training.sh && chmod +x ./run_hf_training.sh
26
 
27
- # Grant full read/write access so Hugging Face user 1000 can write model checkpoints
28
- RUN chmod -R 777 /app
29
-
30
  # Health check
31
  HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
32
  CMD curl -f http://localhost:${PORT}/health || exit 1
33
 
34
- # Execute the training script
35
- CMD ["./run_hf_training.sh"]
 
24
  COPY run_hf_training.sh ./run_hf_training.sh
25
  RUN sed -i 's/\r$//' ./run_hf_training.sh && chmod +x ./run_hf_training.sh
26
 
 
 
 
27
  # Health check
28
  HEALTHCHECK --interval=30s --timeout=5s --start-period=15s --retries=3 \
29
  CMD curl -f http://localhost:${PORT}/health || exit 1
30
 
31
+ # Start the FastAPI server on HF Spaces port
32
+ CMD ["sh", "-c", "uvicorn salespath_env.server.app:app --host 0.0.0.0 --port ${PORT}"]